Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler error on OS X 10.6 #1465

Closed
wants to merge 3,402 commits into from
Closed

Fix compiler error on OS X 10.6 #1465

wants to merge 3,402 commits into from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Aug 27, 2019

  1. Fix typo

    krader1961 committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    13f4a8c View commit details
    Browse the repository at this point in the history
  2. Move the whence documentation into a text file

    This is the very first step in resolving issue #507. It moves the text for
    the documentation of a single command out of the source code and into a
    standalone text file. It sets up the framework for converting such files
    back into C source for use by the optget() function.
    
    Related #507
    krader1961 committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    a724383 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2019

  1. Move the other builtin command docs into ext files

    This builds on the prior change to extricate builtin command documentation
    out of the source and into an external text file for each command.
    Which is the next step into converting the documentation to a modern
    markup language.
    
    Related #507
    krader1961 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    44fb5d5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f5ae4ee View commit details
    Browse the repository at this point in the history
  3. Move libcmd into the ksh tree

    This is to facilitate extracting the command documentation into text
    files separate from the source code.
    
    Related #507
    krader1961 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    a226181 View commit details
    Browse the repository at this point in the history
  4. More builtin documention moved to external files

    Move the libcmd builtin documentation into files separate from the
    source code.
    
    Related #507
    krader1961 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    62fdca2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    282247d View commit details
    Browse the repository at this point in the history
  6. Lint cleanup

    krader1961 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    b0a1984 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e6e79c9 View commit details
    Browse the repository at this point in the history
  8. cppcheck lint cleanup

    krader1961 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    da4f59d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d0d07c6 View commit details
    Browse the repository at this point in the history
  10. Refactor export and readonly

    Move the code for `b_readonly()` into its own module. Refactor it so
    that the `readonly` and `export` commands only share the `setall()`
    function.
    krader1961 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    2bf7a27 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2019

  1. Configuration menu
    Copy the full SHA
    3d3e417 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e3eb5e1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    90f9b53 View commit details
    Browse the repository at this point in the history
  4. Move b_set() into its own module

    This also moves `b_unalias()` into the same module. TBD is refactoring
    the code to move the option parsing out of the `unall()` function and
    into the respective `b_*()` functions.
    krader1961 committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    75f9c39 View commit details
    Browse the repository at this point in the history
  5. Fix definition of print_scan() function

    Builds on Copr and OBS were failing because `print_scan()` function
    definition was not prefixed with `static_fn`.
    siteshwar committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    0b46d8c View commit details
    Browse the repository at this point in the history
  6. Make print_scan() function non-static

    Recently builtins were moved into separate modules. It broke builds in
    Copr and OBS. `print_scan()` function should be declared non-static as
    it's used in more than one file. Fix made in previous commit was
    incorrect.
    siteshwar committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    15f781f View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2019

  1. 3 Configuration menu
    Copy the full SHA
    13d6ace View commit details
    Browse the repository at this point in the history
  2. Refactor bg_fg_disown.c

    Move each of the `bg`, `fg`, and `disown` implementations into separate
    modules.
    krader1961 committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    208c23d View commit details
    Browse the repository at this point in the history
  3. Refactor module true_false.c

    Move each command implementation into its own module.
    krader1961 committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    7f1061c View commit details
    Browse the repository at this point in the history
  4. Refactor break_continue.c and return_exit.c

    Separate the break/continue and return/exit implementations into separate
    modules to improve clarity. This increases the size of the binary by a
    few words but that is well worth it for the improved clarity.
    krader1961 committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    6a372af View commit details
    Browse the repository at this point in the history
  5. Refactor cd_pwd.c

    Separate the `cd` and `pwd` implementations into separate modules to
    improve code clarity.
    krader1961 committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    5e0ff94 View commit details
    Browse the repository at this point in the history
  6. Remove unsed, broken, "hash" builtin

    Fixes #1387
    krader1961 committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    fb2e95b View commit details
    Browse the repository at this point in the history
  7. Enable code predicated on _c99_in_the_wild

    Resolves #1351
    krader1961 committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    9ba9355 View commit details
    Browse the repository at this point in the history
  8. Refactor b_unset(), b_unalias, and unall()

    With this change all special builtins are now in their own source
    module. More importantly this eliminates a lot of cleverness that
    obfuscates the actual behavior.
    krader1961 committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    d5277d3 View commit details
    Browse the repository at this point in the history
  9. Release ksh-2020.0.0-beta1

    Update fallback version to `2020.0.0-beta1`
    siteshwar committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    32d8131 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0f44849 View commit details
    Browse the repository at this point in the history
  11. Move sig_number() out of trap.c

    We want to be able to separate `b_trap()` and `b_kill()` into separate
    source modules. This is a step towards doing so.
    krader1961 committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    36d688a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    990f237 View commit details
    Browse the repository at this point in the history
  13. Eliminate pointless Bltin() preprocessor macro

    The `Bltin()` macro serves no useful purpose. Its use does not affect
    the behavior of the target functions. Which means those functions can
    recognize long name options. Similarly command definitions which use
    `bltin()` aren't required to use long options.
    
    Resolves #1388
    krader1961 committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    e069b75 View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2019

  1. IWYU lint

    krader1961 committed Aug 31, 2019
    Configuration menu
    Copy the full SHA
    4de8a51 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2019

  1. Skip API test if build type != debug

    Fixes #1390
    krader1961 committed Sep 1, 2019
    Configuration menu
    Copy the full SHA
    d89753b View commit details
    Browse the repository at this point in the history
  2. Ensure USER is set when unit tests run

    Related #1391
    krader1961 committed Sep 1, 2019
    Configuration menu
    Copy the full SHA
    cb9f6d3 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2019

  1. Replace e_astbin with SH_CMDLIB_DIR

    The e_astbin var doesn't serve a useful purpose so replace uses of it
    with the string constant assigned to the var.
    krader1961 committed Sep 2, 2019
    Configuration menu
    Copy the full SHA
    dc9fccc View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2019

  1. Introduce ${.sh.install_prefix}

    This var will be useful for doing things like finding the man pages
    for builtins. It will hold the value of `meson --prefix=/path`.
    Typically, /usr or /usr/local.
    krader1961 committed Sep 3, 2019
    Configuration menu
    Copy the full SHA
    a54c289 View commit details
    Browse the repository at this point in the history
  2. Make the code less fragile

    The use of `#define` with hard-coded offsets into a large table is
    fragile. That is, dangerous because the offsets may not be correct.
    Replace those with vars that are updated during process initialization
    to point to the correct data structure.
    
    Fixes #1394
    krader1961 committed Sep 3, 2019
    Configuration menu
    Copy the full SHA
    2d497fb View commit details
    Browse the repository at this point in the history
  3. Switch to a more idiomatic end-of-table check

    The code that checks if the end of a `struct shtable2[]` has been reached
    presumes a valid, non-NULL, pointer to the `sh_name` structure member.
    It is more idiomatic to simply check for sh_name == NULL and change the
    table initialization accordingly.
    krader1961 committed Sep 3, 2019
    Configuration menu
    Copy the full SHA
    2bce63a View commit details
    Browse the repository at this point in the history
  4. Fix various typos found by codespell

    hosiet authored and krader1961 committed Sep 3, 2019
    Configuration menu
    Copy the full SHA
    657c587 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2019

  1. Replace commit 2d497fb with a better approach

    Having an independent set of vars contain pointers also stored in
    shgd->bltin_nodes is sort of gross. Replace that approach with a
    structure. That allow us to use a name instead of a possibly incorrect
    array offset for quick access to a specific shell var. Now we only have
    to worry about the number of vars changing and that is something we can
    cheaply detect at run time.
    
    Also implement a consistent naming scheme for the special symbol for each
    shell var. The old scheme was very inconsistent. The new scheme has a
    `VAR_` prefix for all of the vars and the suffix is the actual shell
    var name.
    krader1961 committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    a9d4bb0 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2019

  1. Make b_times.exp unit test more robust

    Fixes #1398
    krader1961 committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    44463c0 View commit details
    Browse the repository at this point in the history
  2. Convert alias documentation to Sphinx/RST

    This is a proof of concept change to implement the documentation using
    Sphinx/RST markup. It includes documentation for the `alias` special
    builtin and the `basename` command builtin.  The sole purpose is to
    establish that using Sphinx/RST is viable by providing concrete examples
    for examination.
    
    I've deliberately chosen to include the documentation build artifacts
    in the commit.  This means that for now the CI builds, and anyone else
    building from source, doesn't need to have Sphinx installed to build the
    documentation. This does mean that some care is needed to always run `make
    man` and `make html` before committing any change to the documentation. TBD
    is whether a trigger of some sort will be needed to ensure the two sets
    of files are kept in sync.
    
    Related #507
    krader1961 committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    24e968c View commit details
    Browse the repository at this point in the history
  3. Switch b_alias() from optget() to getopt_long()

    Another step in switching from the DocOpt base option processing done by
    the AST `optget()` function to the borg standard `getopt_long()`.
    
    It also introduces a system-wide ksh config script to enable auto-loading
    functions included with ksh by default. This allows the use of the
    auto-loaded `_ksh_print_help` function. As well as the dirs/popd/pushd
    set of functions that have been the sole functions included with ksh
    forever but not automatically enabled.
    
    Related #507
    Fixes #835
    krader1961 committed Sep 10, 2019
    2 Configuration menu
    Copy the full SHA
    fa9673c View commit details
    Browse the repository at this point in the history
  4. Implement man function

    This adds a `man` function to give priority to ksh man pages. Making it
    possible to do `man alias`, for example.
    
    Related #507
    krader1961 committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    a08307c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d0f92b4 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2019

  1. Changes to make the tests pass

    This includes changes to make the b_alias, b_basename, and builtins unit
    tests pass in light of the previous changes.
    krader1961 committed Sep 11, 2019
    Configuration menu
    Copy the full SHA
    f4c1514 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f124433 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    780492b View commit details
    Browse the repository at this point in the history
  4. Move b_echo() into its own module

    Note that a lot more work is needed. The logic shared by b_echo(),
    b_print(), and b_printf() needs to be refactored out of b_print() and
    into its own function; sh_print()?
    krader1961 committed Sep 11, 2019
    Configuration menu
    Copy the full SHA
    3bd5b4f View commit details
    Browse the repository at this point in the history
  5. Fix shellcheck errors

    krader1961 committed Sep 11, 2019
    Configuration menu
    Copy the full SHA
    6153a5a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fca4d53 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0101139 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d49d8de View commit details
    Browse the repository at this point in the history
  9. Use MESON_INSTALL_DESTDIR_PREFIX variable

    instead of `MESON_INSTALL_PREFIX`.
    
    This variable prefixes `DESTDIR` if set. This variable points to
    temporary installation directory used during package builds. This fixes
    package builds on OBS and Copr.
    siteshwar committed Sep 11, 2019
    Configuration menu
    Copy the full SHA
    6d55cdc View commit details
    Browse the repository at this point in the history
  10. [packaging] Add missing files in rpm builds

    Recent changes have introduced new files that are installed by default.
    Add those files under `%files` section in rpm spec files.
    siteshwar committed Sep 11, 2019
    Configuration menu
    Copy the full SHA
    9c9a5c8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    244d9cc View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2019

  1. Configuration menu
    Copy the full SHA
    ce77f93 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c085cbc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d5d60da View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c0abef8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a2f9d59 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0f8af10 View commit details
    Browse the repository at this point in the history
  7. IWYU lint

    krader1961 committed Sep 13, 2019
    Configuration menu
    Copy the full SHA
    9487319 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0ba0a7b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2102308 View commit details
    Browse the repository at this point in the history
  10. Switch to POSIXLY_CORRECT option parsing

    Unsurprisingly the AST `optget()` function defaults to POSIXLY_CORRECT
    option parsing behavior. So switch the `getopt_long()` flag specs to
    that behavior be prepending a `+` to the short flags string.
    krader1961 committed Sep 13, 2019
    Configuration menu
    Copy the full SHA
    1687f3b View commit details
    Browse the repository at this point in the history
  11. Fix expansion of bare tildes when HOME is unset

    Use getpwuid to find the user name and home directory. Cache the user name for
    future logins_tree lookups to avoid repeating the getpwuid call.
    
    Fixes: #1391
    floppym authored and krader1961 committed Sep 13, 2019
    Configuration menu
    Copy the full SHA
    c4f582d View commit details
    Browse the repository at this point in the history
  12. make man

    krader1961 committed Sep 13, 2019
    Configuration menu
    Copy the full SHA
    6ef2ca5 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2019

  1. Configuration menu
    Copy the full SHA
    7c174b5 View commit details
    Browse the repository at this point in the history
  2. Correct which optget_long() error handling

    The existing code is fine for long flags and single short flags. But
    when short flags are bundled together if one of them is invalid then the
    wrong arg is displayed in the error message.
    krader1961 committed Sep 14, 2019
    Configuration menu
    Copy the full SHA
    96b19ee View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0f05131 View commit details
    Browse the repository at this point in the history
  4. Don't assume no_argument is zero

    The `getopt_long()` symbol `no_argument` is zero on every platform I have
    access to. Nonetheless, don't assume that is true. Use the symbolic name.
    krader1961 committed Sep 14, 2019
    Configuration menu
    Copy the full SHA
    2b6e821 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8aa6eea View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b935f1a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a421fe8 View commit details
    Browse the repository at this point in the history
  8. Document fix for issue #1391

    krader1961 committed Sep 14, 2019
    Configuration menu
    Copy the full SHA
    c682318 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2019

  1. Use sphinx to generate the docs if available

    If the sphinx-build command is installed use it to generate the
    documentation from the reStructuredText source. Otherwise, use the
    prebuild man pages.
    krader1961 committed Sep 15, 2019
    Configuration menu
    Copy the full SHA
    c44e124 View commit details
    Browse the repository at this point in the history
  2. Create echo.rst document

    krader1961 committed Sep 15, 2019
    Configuration menu
    Copy the full SHA
    bc155a2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c3a2b14 View commit details
    Browse the repository at this point in the history
  4. Man page rst cleanups

    krader1961 committed Sep 15, 2019
    Configuration menu
    Copy the full SHA
    62fd830 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9484249 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2019

  1. Configuration menu
    Copy the full SHA
    d9491d4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8aa9ac9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1da542f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e0c4882 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    57085ad View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c584641 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    695269a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    66d0976 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2019

  1. Revert "Switch b_hist() from optget() to getopt_long()"

    This reverts commit 695269a.
    
    The b_hist() code is structured weird. Switching to getopt_long() is
    going to require a better understanding of the current structure.
    Specifically, how an argument like `-1` is handled.
    krader1961 committed Sep 17, 2019
    Configuration menu
    Copy the full SHA
    1c9e7ab View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    91a75b9 View commit details
    Browse the repository at this point in the history
  3. run_test.sh: exit with status 77 when skipping a test

    meson test outputs "SKIP" in the log when it sees this status.
    
    https://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors
    
    postscript.sh: cap error count to 50
    
    meson uses specific high-numbered exit status values to detect skips and
    errors. Avoid using these for legitimate test failures.
    floppym authored and krader1961 committed Sep 17, 2019
    Configuration menu
    Copy the full SHA
    1eb928a View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2019

  1. Initialize the jobs table earlier

    While investigating a security issue it came to light that the jobs
    table isn't initialized early enough. Prior to this change command
    substitution might happen before it is initialized. Which leads to
    dereferencing a NULL pointer.
    krader1961 committed Sep 18, 2019
    Configuration menu
    Copy the full SHA
    25f73f4 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2019

  1. Configuration menu
    Copy the full SHA
    1893891 View commit details
    Browse the repository at this point in the history
  2. Fix and normalize handling of atypical CLI flags

    This was prompted by the need to correctly handle negative integers
    which would otherwise look like invalid short flags. But it also fixes
    the information displayed when an invalid flag is seen. The previous code
    worked correctly only in limited situations (e.g., the invalid flag being
    the first CLI arg).
    krader1961 committed Sep 19, 2019
    Configuration menu
    Copy the full SHA
    4c9c596 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    98bc42a View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2019

  1. Configuration menu
    Copy the full SHA
    3dffc9d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    abe5bd6 View commit details
    Browse the repository at this point in the history
  3. Fix exit getopt_long() short options

    The `X` short flag was left over from experimenting with the behavior of
    `getopt_long()`.
    krader1961 committed Sep 20, 2019
    Configuration menu
    Copy the full SHA
    957ce01 View commit details
    Browse the repository at this point in the history
  4. Fix head handling of integer flags

    To have `head` correctly handle a line number that looks like a flag
    we have to use `getopt_long_only()` rather than `getopt_long()`. Add
    a regression test to ensure this bug doesn't occur again.
    krader1961 committed Sep 20, 2019
    Configuration menu
    Copy the full SHA
    376b085 View commit details
    Browse the repository at this point in the history
  5. Remove support for negative ints from bg and fg

    Despite the embedded documentation implying negative ints are supported
    they aren't. Furthermore, using a process group ID in the context of `bg`
    and `fg` doesn't really make any sense.
    krader1961 committed Sep 20, 2019
    Configuration menu
    Copy the full SHA
    abf06c2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7368706 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c3aa2d5 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2019

  1. Configuration menu
    Copy the full SHA
    46215d4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    eb8e227 View commit details
    Browse the repository at this point in the history
  3. man: Silence mandoc warnings in ksh.1.

    orbea authored and krader1961 committed Sep 21, 2019
    Configuration menu
    Copy the full SHA
    0ffecb0 View commit details
    Browse the repository at this point in the history
  4. bin/style all

    krader1961 committed Sep 21, 2019
    Configuration menu
    Copy the full SHA
    7c17e44 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7b5953c View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2019

  1. Add more print -R tests

    The semantics of `print -R` are very strange. Before embarking on
    refactoring the b_print() function and related code make sure we have
    good coverage of its behavior.
    krader1961 committed Sep 22, 2019
    Configuration menu
    Copy the full SHA
    f4d7c1b View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2019

  1. Refactor b_print(), b_echo(), and b_printf()

    The way in which these three commands were entangled made understanding
    the behavior of each much more difficult. The code is also confusing for
    other reasons such as aliasing variable `rflag` with `(struct print).raw`.
    It also makes it hard to replace optget() with getopt_long(). So before
    doing that refactor the code in question.
    krader1961 committed Sep 24, 2019
    Configuration menu
    Copy the full SHA
    6993358 View commit details
    Browse the repository at this point in the history
  2. Remove login and newgrp special builtins

    Resolves #1348
    krader1961 committed Sep 24, 2019
    Configuration menu
    Copy the full SHA
    08ab0ec View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2019

  1. Switch b_print() from optget() to getopt_long()

    Related #507
    Resolves #1407
    krader1961 committed Sep 25, 2019
    Configuration menu
    Copy the full SHA
    1885d04 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    72e1624 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7f06b58 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4e401a9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4f00fdb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8bdfa5b View commit details
    Browse the repository at this point in the history
  7. Change naming of ksh script based tests

    The naming of non-expect versus expect based tests has bothered me from
    the day we implemented the current test naming scheme. Specifically, that
    `expect` based tests explicitly end with `.exp` while ksh scripts do not
    end in `.sh` (or `.ksh`) even though the unit test file name does end in
    that extension. This makes the naming consistent.
    krader1961 committed Sep 25, 2019
    Configuration menu
    Copy the full SHA
    857b058 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2019

  1. Configuration menu
    Copy the full SHA
    1b34915 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2019

  1. Eliminate Meson warning about our config file

    This eliminates this Meson warning:
    
        WARNING: Consider using the builtin option for language standard
        version rather than adding flags by hand.
    krader1961 committed Sep 28, 2019
    Configuration menu
    Copy the full SHA
    2828fd9 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2019

  1. Coverity Scan lint cleanup

    CID#349551
    CID#349550
    krader1961 committed Sep 29, 2019
    Configuration menu
    Copy the full SHA
    07e8829 View commit details
    Browse the repository at this point in the history
  2. Remove pointless checks of malloc() failing

    Related #853
    Related #1397
    krader1961 committed Sep 29, 2019
    Configuration menu
    Copy the full SHA
    8031fed View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2019

  1. Configuration menu
    Copy the full SHA
    762f838 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ce7e096 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3be7e10 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2019

  1. Configuration menu
    Copy the full SHA
    461707e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cfec3cb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5c3052b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    394ba62 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2019

  1. Configuration menu
    Copy the full SHA
    39bf126 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    541a7d4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3955a1c View commit details
    Browse the repository at this point in the history
  4. bin/style all

    krader1961 committed Oct 2, 2019
    Configuration menu
    Copy the full SHA
    485fb82 View commit details
    Browse the repository at this point in the history
  5. Lint cleanup

    krader1961 committed Oct 2, 2019
    Configuration menu
    Copy the full SHA
    fcd6535 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    31aec52 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f8a6aa6 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2019

  1. Configuration menu
    Copy the full SHA
    28592fc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    44d6381 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c68faf0 View commit details
    Browse the repository at this point in the history
  4. Simplify nv_addtype()

    Resolves #1410
    krader1961 committed Oct 3, 2019
    Configuration menu
    Copy the full SHA
    e02c662 View commit details
    Browse the repository at this point in the history
  5. Remove the type builtin

    The predefined alias overrides (masks) the `type` builtin. Since it is a
    trivial variant of `whence` that is only exposed if the predefined alias
    is removed there isn't any point in having it also defined as a builtin.
    krader1961 committed Oct 3, 2019
    Configuration menu
    Copy the full SHA
    45ea282 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2019

  1. Configuration menu
    Copy the full SHA
    669656b View commit details
    Browse the repository at this point in the history
  2. make man

    krader1961 committed Oct 4, 2019
    Configuration menu
    Copy the full SHA
    e30225b View commit details
    Browse the repository at this point in the history
  3. Enable the expect based tests on FreeBSD

    Several months ago I disabled all `expect` based tests on FreeBSD. Since
    then I fixed the problem that caused those tests to fail on FreeBSD;
    specifically, that the terminal size was bogus. This change re-enables
    those tests and fixes related issues.
    krader1961 committed Oct 4, 2019
    Configuration menu
    Copy the full SHA
    7005717 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2019

  1. Fix complete flag handling

    Coverity CID#349741
    krader1961 committed Oct 5, 2019
    Configuration menu
    Copy the full SHA
    2095983 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2019

  1. Improve handling of unit test timeouts

    This makes it more likely we will get useful information about the state
    of an `expect` based unit test if it never finishes. Thus triggering a
    meson test timeout. This doesn't really fix #1411 but it could be many
    weeks, even months, before I notice a failure of test `glob.exp`. Plus I
    don't see any reason for this test to timeout. So without more information
    there isn't much point keeping that issue open.
    
    Fixes #1411
    krader1961 committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    c3098f7 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2019

  1. Enable real-time signal test

    A year ago we were seeing `signal.sh` test failures that implied a
    use-after-free bug. I can no longer reproduce those failures. It looks
    like some other change committed since then has fixed this issue. So
    re-enable that test.
    
    xResolves #633
    krader1961 committed Oct 7, 2019
    Configuration menu
    Copy the full SHA
    c52d3a3 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2019

  1. Configuration menu
    Copy the full SHA
    b18d4ae View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2019

  1. Cleanup feature test artifacts

    Fixes #1414
    krader1961 committed Oct 10, 2019
    Configuration menu
    Copy the full SHA
    a5ecd1c View commit details
    Browse the repository at this point in the history
  2. Show version number through ksh --version

    Version number is stored in `SH_RELEASE` macro. Add it to the output of
    `ksh --version`. This was a regression introduced by 44fb5d5.
    siteshwar committed Oct 10, 2019
    Configuration menu
    Copy the full SHA
    ad9d63d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f5d2e83 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2019

  1. Move the logic for skipping tests

    Move the logic for skipping tests from the meson.build file to the
    run_test.sh script. This is for
    
    a) consistency since some tests are already skipped in run_test.sh or in a
    specific unit test, and
    
    b) because it is better to have `meson test` show which tests are skipped
    rather than during the `meson` config phase.
    
    The reason the skip logic was originally in the meson.build config file
    was that we didn't know about the magic `77` exit status that Meson
    recognizes to mean the test was skipped rather than passed or failed.
    krader1961 committed Oct 12, 2019
    Configuration menu
    Copy the full SHA
    d2e31cc View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2019

  1. Minor spelling fixes

    aweeraman authored and krader1961 committed Oct 20, 2019
    Configuration menu
    Copy the full SHA
    d1de147 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2019

  1. Implement an optget() like alternative

    Implement an alternative to the legacy AST optget() function. This looks
    and behaves much like the getopt_long() function provided by GNU and BSD
    based platforms but with two extensions supported by AST optget().  First,
    integers represented as short flags; e.g., `-123`. Second, short flags that
    are prefixed by `+` rather than `-`. It also deviates from getopt_long()
    by not supporting some legacy behaviors of that API which we don't need.
    
    This is related to Github issue #507 because having such a function is
    required for parsing the `set`, `typeset`, and `ksh` command args. That
    is because those commands/programs require supporting short flags like
    `+o abc` to mean the opposite of `-o abc`. Something that is effectively
    impossible using the borg standard getopt_long() function.
    
    Handling numeric args that otherwise look like an invalid short flag can
    be done with getopt_long_only() but this implementation makes it much
    easier. Too, without the risk of recognizing `-abc` as equivalent to
    `--abc` since that wasn't supported by the legacy AST optget() function.
    
    Related #507
    krader1961 committed Oct 24, 2019
    Configuration menu
    Copy the full SHA
    ddfe6b3 View commit details
    Browse the repository at this point in the history
  2. Switch from getopt_long() to optget_long()

    Related #507
    krader1961 committed Oct 24, 2019
    Configuration menu
    Copy the full SHA
    7faa294 View commit details
    Browse the repository at this point in the history
  3. Convert some getopt_long_only() to optget_long()

    These would have been included in the previous commit but all of these
    commands had a copy/paste error. They used `getopt_long_only()` when
    they should have used `getopt_long()`. Thus they were excluded from the
    previous change.
    krader1961 committed Oct 24, 2019
    Configuration menu
    Copy the full SHA
    a9b86b6 View commit details
    Browse the repository at this point in the history
  4. Convert remaining getopt_long_only()

    Related #507
    krader1961 committed Oct 24, 2019
    Configuration menu
    Copy the full SHA
    84648ca View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2019

  1. Add more optget_long() unit tests

    Add some explicit, complex, tests of how `optget_long()` handles options
    which have required or optional values. As with previous changes this
    also helps ensure out behavior is compatible with the GNU and BSD
    implementations of `getopt_long()` while still allowing us to implement
    ksh specific extensions.  Such as explicit support of numbers as short
    options and short options prefixed by `+` rather than `-`.
    krader1961 committed Oct 25, 2019
    Configuration menu
    Copy the full SHA
    856f994 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2019

  1. Try to reduce false positive expect test failures

    Since I modified the framework for running `expect` based tests to capture
    more info when they timeout I've noticed that every single timeout happens
    on the final [ctrl-D] to terminate the shell. Instead of terminating the
    shell a new prompt appears. This is an attempt to make those failures
    less likely.
    krader1961 committed Oct 28, 2019
    Configuration menu
    Copy the full SHA
    e7713a5 View commit details
    Browse the repository at this point in the history
  2. style --all

    krader1961 committed Oct 28, 2019
    Configuration menu
    Copy the full SHA
    2df35bd View commit details
    Browse the repository at this point in the history
  3. Silence Coverity Scan lint warning

    Coverity CID #350321
    krader1961 committed Oct 28, 2019
    Configuration menu
    Copy the full SHA
    c791a0d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7f5e094 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bd87dbf View commit details
    Browse the repository at this point in the history
  6. Silence lint warning about uninitialized var

    The cppcheck lint tool warns that `flags` might be used without being
    initialized. It's not obvious that can actually happen. Nonetheless,
    initialize the var to avoid passing a random value to `nv_pubsub()`.
    krader1961 committed Oct 28, 2019
    Configuration menu
    Copy the full SHA
    0d96c25 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8e019ec View commit details
    Browse the repository at this point in the history
  8. cppcheck lint elimination

    krader1961 committed Oct 28, 2019
    Configuration menu
    Copy the full SHA
    0451612 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fec0369 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a32b02c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d9103c8 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2019

  1. Make DPRINTF() more robust

    Once in a while I'll use `DPRINTF()` in a way that causes a SIGSEGV while
    formatting the message. Usually because I'm trying to print a bogus pointer
    via the `%s` formatting directive. This causes the code to catch that
    failure and substitute a generic message rather than killing the process.
    krader1961 committed Oct 29, 2019
    Configuration menu
    Copy the full SHA
    dd2c8ea View commit details
    Browse the repository at this point in the history
  2. Use static_fn rather than static

    I introduced `static_fn` long ago when I when I started contributing
    changes and wanted a better way to report a minimally useful backtrace when
    events like SIGSEGV being delivered occur. This changes the declarations
    of the remaining ksh `static` functions that should use `static_fn`.
    This is mostly for consistency rather than any belief that having these
    functions be global will materially improve diagnostic feedback.
    krader1961 committed Oct 29, 2019
    Configuration menu
    Copy the full SHA
    4a5d206 View commit details
    Browse the repository at this point in the history
  3. Update Travis "fedora" config

    Fixes 1422
    krader1961 committed Oct 29, 2019
    Configuration menu
    Copy the full SHA
    4503830 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2019

  1. Correct invalid argv[-1]

    Fixes #1423
    krader1961 committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    9490d10 View commit details
    Browse the repository at this point in the history
  2. Silence cppcheck warning about argv[-1]

    Related #1423
    krader1961 committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    6511635 View commit details
    Browse the repository at this point in the history
  3. Fix cd function and make it automatically available

    User Andras Farkas <[email protected]> brought this issue to our
    attention via a message on the ksh mailing list. There are two problems.
    First, autoloaded functions `cd` and `mcd` aren't available until the
    user uses the `dirs` command. So put each function definition in its own
    autoloaded file. Second, the `_cd` function behaves incorrectly if you
    invoke it with no arguments.
    
    I'm ambivalent about the `_cd` behavior of always printing the selected
    directory on stdout. Personally I think that is just noise. If the user
    wants to be reminded what the CWD is they can put it in their prompt.
    But I'm keeping that behavior for the moment to see how others feel and
    because that is what the legacy implementation does which implies some
    people think the behavior is useful.
    krader1961 committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    651e614 View commit details
    Browse the repository at this point in the history
  4. Run autoloaded functions through shellcheck

    This also fixes some problems with the autoloaded functions that I
    noticed while addressing the shellcheck warnings.
    krader1961 committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    286203f View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2019

  1. Fix errors due to wchar_t being two bytes

    On MS Windows, under Cygwin not WSL, the wchar_t type is an unsigned
    short. That causes warnings and errors that cause the build to fail.
    This "fixes" that.
    
    Fixes #704
    krader1961 committed Oct 31, 2019
    Configuration menu
    Copy the full SHA
    886d86f View commit details
    Browse the repository at this point in the history
  2. 1 Configuration menu
    Copy the full SHA
    f867740 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2019

  1. Configuration menu
    Copy the full SHA
    c6c8c0c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    42e8a04 View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2019

  1. lower test parallelism on travis macos

    Tests have been timing out on the Travis macOS environment starting a
    couple of days ago. It appears those servers are extremely overloaded.
    So reduce our load on the server to increase the likelihood the tests
    will pass.
    krader1961 committed Nov 2, 2019
    Configuration menu
    Copy the full SHA
    1a34ebd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2580181 View commit details
    Browse the repository at this point in the history
  3. Fix b_sync.sh test failures on some macOS systems

    When run with malloc debugging enabled fd 3 might be open. Switch to a
    fd that should never be valid; i.e., open.
    krader1961 committed Nov 2, 2019
    Configuration menu
    Copy the full SHA
    b058d8c View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2019

  1. Fix fallback addrs2info()

    danyspin97 authored and krader1961 committed Nov 3, 2019
    Configuration menu
    Copy the full SHA
    11983a7 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2019

  1. Configuration menu
    Copy the full SHA
    8e4c8f0 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2019

  1. Move the generated version from a .h to a .c file

    The SH_VERSION preprocessor symbol has bothered me for a long time.
    Especially as used in the context of `e_version[]`. This simplifies how
    the version is injected by the build process into the code; notwithstanding
    the large number of files touched by this change.
    krader1961 committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    4a438e5 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2019

  1. Revert "Move the generated version from a .h to a .c file"

    This reverts commit 4a438e5.
    
    I had not intended to push this upstream as it's a work in progress and
    needs to be reviewed.
    krader1961 committed Nov 7, 2019
    1 Configuration menu
    Copy the full SHA
    91b3806 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a205e5a View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2019

  1. Fix hist_nearend()

    The original code, prior to the fix for issue #1271, called sfreserve()
    with just the SF_LOCKR. While fixing the core issue of issue #1271 I
    noticed the buffer did not have a read/write mode. Which is wrong. What
    I didn't realize was that is equivalent to read+write. I incorrectly
    included SF_WRITE rather than SF_RDWR.
    
    Fixes #1432
    krader1961 committed Nov 8, 2019
    Configuration menu
    Copy the full SHA
    a3c2dfb View commit details
    Browse the repository at this point in the history
  2. Lint cleanup

    [src/cmd/ksh93/edit/history.c:759] error (nullPointerArithmetic):
     Pointer addition with NULL pointer.
    krader1961 committed Nov 8, 2019
    Configuration menu
    Copy the full SHA
    c584768 View commit details
    Browse the repository at this point in the history
  3. Remove unused header siglist.h

    It is interesting that no one noticed the siglist.h header is no longer
    used. So eliminate the dynamic generation of that unused header.
    krader1961 committed Nov 8, 2019
    Configuration menu
    Copy the full SHA
    c25958e View commit details
    Browse the repository at this point in the history
  4. "unknown flag" -> "unknown option"

    This is an anal-retentive change :-) We prefer "uknown option" over
    "unknown flag".
    krader1961 committed Nov 8, 2019
    Configuration menu
    Copy the full SHA
    ffbfaf6 View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2019

  1. Fix ed_expand()

    The ed_expand() function can attempt to modify the byte(s) immediately
    preceding `outbuff` if called with `*cur == -1`. That is not legal or
    safe.
    
    Related #1429
    krader1961 committed Nov 12, 2019
    Configuration menu
    Copy the full SHA
    a0c44c9 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2019

  1. functions with not loaded autoloaded functions

    If there are functions marked to be autloaded, but not yet loaded, typing
    `typeset -f` or `functions` dereferences a NULL pointer.
    
    Fixes #1436
    krader1961 committed Nov 14, 2019
    Configuration menu
    Copy the full SHA
    7df11de View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2019

  1. Regression tests for typeset -f fix

    Related #1436
    krader1961 committed Nov 15, 2019
    Configuration menu
    Copy the full SHA
    7c92227 View commit details
    Browse the repository at this point in the history
  2. Move the generated version from a .h to a .c file

    Reinstate commit 4a438e5 that was reverted by commit 91b3806. That
    commit reversion was a mistake because it appeared, based on the problem
    description, that the change incorrectly constrained the valid version
    strings.  Subsequent analysis of the problem showed that not to be the case
    and the problem reporter was, in fact, attempting to use a non-semantic
    version string.
    
    The SH_VERSION preprocessor symbol has bothered me for a long time.
    Especially as used in the context of `e_version[]`. This simplifies how
    the version is injected by the build process into the code; notwithstanding
    the large number of files touched by this change.
    krader1961 committed Nov 15, 2019
    Configuration menu
    Copy the full SHA
    d72c3a6 View commit details
    Browse the repository at this point in the history
  3. Improve style of sh_close()

    Looking into issue #1438 caused me to notice the style of `sh_close()`
    would benefit from some tweaking.
    krader1961 committed Nov 15, 2019
    Configuration menu
    Copy the full SHA
    c99e9ff View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2019

  1. Configuration menu
    Copy the full SHA
    359bf21 View commit details
    Browse the repository at this point in the history
  2. Disable flakey API unit test

    Related #1428
    krader1961 committed Nov 17, 2019
    Configuration menu
    Copy the full SHA
    0525de9 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2019

  1. Configuration menu
    Copy the full SHA
    42a580c View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2019

  1. Configuration menu
    Copy the full SHA
    c1af9c6 View commit details
    Browse the repository at this point in the history
  2. Cleanup: remove unused function

    The clock_t_delta() function was made obsolete by commit 2e18c67 so
    remove it and thus eliminate a compiler warning.
    krader1961 committed Nov 29, 2019
    Configuration menu
    Copy the full SHA
    61cfd45 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9c7211b View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2019

  1. Configuration menu
    Copy the full SHA
    2806b21 View commit details
    Browse the repository at this point in the history
  2. Lint cleanup

    These cppcheck warnings are false positives:
    
    [src/lib/libast/regex/regcache.c:126] warning (objectIndex):
     The address of local variable 'key' might be accessed at non-zero index.
    [src/lib/libast/regex/regcache.c:127] warning (objectIndex):
     The address of local variable 'key' might be accessed at non-zero index.
    
    Nonetheless, modify the code to make it clearer and as a byproduct
    eliminate those warnings.
    krader1961 committed Dec 1, 2019
    Configuration menu
    Copy the full SHA
    5c16e8d View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2019

  1. Remove description of case modification operator

    from man page. This operator was introduced in `ksh93v-` release and was
    disabled earlier through fffe1d9.
    
    Related: #417
    Resolves: #1450
    siteshwar committed Dec 9, 2019
    Configuration menu
    Copy the full SHA
    ca8c7e6 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2019

  1. Lint: negativeIndex

    krader1961 committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    fbaf00e View commit details
    Browse the repository at this point in the history
  2. Lint: invalidPointerCast

    krader1961 committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    f05b619 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2019

  1. Use the ksh semantic version in docs

    Replace today's date in the generated documentation with the ksh
    semantic version (e.g., "2020.0.0").
    krader1961 committed Dec 15, 2019
    Configuration menu
    Copy the full SHA
    82d4f30 View commit details
    Browse the repository at this point in the history
  2. Fix bug introduced by commit 6542e5a

    It turns out that despite the name, `isfun`, and how the code seems to
    manipulate it the var is really tri-state: 0, 1, 2 (PATH_FPATH). This
    also correctly fixes the file descriptor leak that should be impossible
    but given how can_execute() was structured could occur.
    krader1961 committed Dec 15, 2019
    Configuration menu
    Copy the full SHA
    6928edc View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2019

  1. Fix shellcheck warnings created by previous commit

    export KSH_VERSION=$($MESON_BUILD_ROOT/src/cmd/ksh93/ksh -c 'echo ${.sh.version}')
           ^---------^ SC2155: Declare and assign separately to avoid masking return values.
                         ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                ^-------------------^ SC2016: Expressions don't expand in single quotes, use double quotes for that.
    krader1961 committed Dec 16, 2019
    Configuration menu
    Copy the full SHA
    d0a7db5 View commit details
    Browse the repository at this point in the history
  2. Enable shellcheck of standard ksh functions

    I happened to notice that the scripts in the src/cmd/ksh93/functions
    weren't being run through `shellcheck` because they lacked the necessary
    signature.
    krader1961 committed Dec 16, 2019
    Configuration menu
    Copy the full SHA
    bc901af View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2019

  1. Configuration menu
    Copy the full SHA
    02525a3 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2019

  1. Fix shellcheck errors

    krader1961 committed Dec 18, 2019
    Configuration menu
    Copy the full SHA
    5efb243 View commit details
    Browse the repository at this point in the history
  2. Harden env var imports

    krader1961 committed Dec 18, 2019
    1 Configuration menu
    Copy the full SHA
    c7de8b6 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2019

  1. Fix unit test build on NetBSD

    NetBSD does not have a `getopt_long_only()` implementation; thus we need
    to skip that compatibility test on that platform.
    
    Fixes #1451
    krader1961 committed Dec 19, 2019
    2 Configuration menu
    Copy the full SHA
    c007254 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2019

  1. Fix unit test build on NetBSD

    The previous fix overlooked that symbol `getopt_long_only` was still
    used even though it wouldn't be called. Fix that oversight and replace
    the `__NetBSD__` symbol test with a proper feature test for whether the
    platform provides `getopt_long_only()`.
    
    Fixes #1451
    krader1961 committed Dec 20, 2019
    Configuration menu
    Copy the full SHA
    c6757a2 View commit details
    Browse the repository at this point in the history
  2. Harden unit test against slow test environments

    I've seen the test of the `$SECONDS` var fail once to often because a
    Travis CI environment is overloaded.
    krader1961 committed Dec 20, 2019
    Configuration menu
    Copy the full SHA
    b6be7e7 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2019

  1. Add option to disable */shcomp test variants

    We always expect the ksh */shcomp unit test variants to behave like the
    non-shcomp variants. So there is normally no reason to run the shcomp
    variants. Provide an option to disable those tests in order to reduce
    the cost of testing ksh script behavior.
    krader1961 committed Dec 22, 2019
    Configuration menu
    Copy the full SHA
    0d76ee4 View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2019

  1. Deal with PATH being unset when running unit tests

    This is nowhere close to optimal. It is a clumsy fix for when the
    user's environment has $PATH unset when running unit tests. The primary
    reason for this change is to replace the unnecessary invocation of
    the external `basename` command with an equivalent ksh builtin when
    running src/cmd/ksh93/data/config.ksh. A secondary reason is to work
    around whatever is causing `$PATH` to be unset for the person who opened
    issue #1453.
    
    Long term we might want to augment the *config.ksh* script to also
    explicitly deal with an empty/unset `$PATH`.
    
    Fixes #1453
    krader1961 committed Dec 27, 2019
    Configuration menu
    Copy the full SHA
    2950ede View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2019

  1. Configuration menu
    Copy the full SHA
    74c34dc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d9ecc21 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2019

  1. Configuration menu
    Copy the full SHA
    37cb9ea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    db20aab View commit details
    Browse the repository at this point in the history
  3. Eliminate $NO_SHCOMP env var

    I introduced the `$NO_SHCOMP` env var long ago as a means of skipping
    shcomp unit test variants when running the tests on my local systems. I
    recently, in commit 0d76ee4, introduced a better mechanism that uses
    `meson -Dbuild-shcomp-tests=false` at config time to supress those tests.
    So simplify the script that runs unit tests.
    
    This includes related cleanups involving the exit status if the test
    runner fails for various reasons or explicitly skips a test for
    compatibility reasons.
    krader1961 committed Dec 29, 2019
    Configuration menu
    Copy the full SHA
    5abcbd0 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2020

  1. Fix handling of skipped directories

    The bug in `path_opentype()` fixed by this commit may affect other
    scenarios but we know it affects autoloaded functions. Hence the unit
    test for that scenario.
    
    Fixes #1454
    krader1961 committed Jan 9, 2020
    Configuration menu
    Copy the full SHA
    3bc5816 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2020

  1. Configuration menu
    Copy the full SHA
    80cc081 View commit details
    Browse the repository at this point in the history
  2. Fix b_printf.sh unit test on Cygwin

    The default `od` output format varies depending on the platform. Force
    output of octal bytes. Also, eliminate the `head -n1` and tighten up the
    matching regex.
    krader1961 committed Jan 10, 2020
    Configuration menu
    Copy the full SHA
    031d73a View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2020

  1. Clarify how to run unit tests

    Recent changes require a `ninja install` step before `meson test`.
    Update the documentation.
    krader1961 committed Jan 11, 2020
    Configuration menu
    Copy the full SHA
    078cb99 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2020

  1. Fix potential fd leak

    The core of this change is moving this statement after the `err:` label:
    
        if (isfun && fd >= 0) sh_close(fd);
    
    While fixing that I also decided to refactor the function to make the
    primary logic of `can_execute()` clearer.
    
    Coverity CID#353337
    krader1961 committed Jan 12, 2020
    Configuration menu
    Copy the full SHA
    55cad1d View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2020

  1. Fix b_print.sh unit test on Cygwin

    The default `od` output format varies depending on the platform. Force
    output of octal bytes. Also, eliminate the `head -n1` and tighten up the
    matching regex. This is the same fix as commit 031d73a but for a
    different unit test.
    krader1961 committed Jan 13, 2020
    Configuration menu
    Copy the full SHA
    2f9b39e View commit details
    Browse the repository at this point in the history
  2. Simplify invalid locale testing

    This fixes one, false positive, failure on Cygwin and simplifies and
    clarifies that test logic.
    krader1961 committed Jan 13, 2020
    Configuration menu
    Copy the full SHA
    6b6146e View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2020

  1. Print correct version string on ksh --version

    This change is a hack. It will be moot once the remaining three uses of
    optget() are modified to use optget_long(). But it's a straightforward
    way to get the correct version string when running `ksh --version`.
    
    Fixes #1456
    krader1961 committed Jan 15, 2020
    Configuration menu
    Copy the full SHA
    b29a24d View commit details
    Browse the repository at this point in the history
  2. Eliminate unneeded use of getconf

    The `getconf` command hasn't been a builtin for a long time. No known, non
    AST implementation, supports `getconf LIBPATH`. So remove that pointless
    test code.
    krader1961 committed Jan 15, 2020
    Configuration menu
    Copy the full SHA
    b277665 View commit details
    Browse the repository at this point in the history
  3. Eliminate bogus locale tests

    Some platforms (e.g., OpenBSD) allow pretty much any locale string. And it
    is not clear why it is the responsibility of ksh to issue a diagnostic if
    an invalid locale is specified by the user. Or why we should be testing
    for this situation. Even ksh93u+, which uses the AST locale subsystem,
    doesn't produce a diagnostic message when doing `LC_CTYPE=xyz.UTF-8`
    on OpenBSD. This is a follow up to commit 6b6146e.
    krader1961 committed Jan 15, 2020
    Configuration menu
    Copy the full SHA
    2f06a34 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2020

  1. Remove another getconf LIBPATH

    Also, simplify the affected test by removing extraneous items.
    krader1961 committed Jan 16, 2020
    Configuration menu
    Copy the full SHA
    127d2e4 View commit details
    Browse the repository at this point in the history
  2. Remove another bogus getconf use

    The test being removed only passes because of the trailing `exit 0`.
    Even with ksh93u+ the preceding two commands fail on all platforms I
    have access to.
    krader1961 committed Jan 16, 2020
    Configuration menu
    Copy the full SHA
    0641d89 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2020

  1. Move cd command so cd ~- works

    This doesn't change any behavior or fix any bug. It simply clarifies the
    behavior of a unit test. See #1457
    
    Rleated #1457
    krader1961 committed Jan 22, 2020
    Configuration menu
    Copy the full SHA
    f80d386 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d5f4cb6 View commit details
    Browse the repository at this point in the history
  3. Remove unused e_crondir var

    I noticed this while reviewing OpenSuse patches that included this,
    pointless, change:
    
    -const char e_crondir[]         = "/usr/spool/cron/atjobs";
    +const char e_crondir[]         = "/var/spool/cron";
    krader1961 committed Jan 22, 2020
    Configuration menu
    Copy the full SHA
    9fa5b47 View commit details
    Browse the repository at this point in the history
  4. Integrate nv_optimize() bug fix from OpenSuse

    This is adapted from the ksh93-optimizeleak.dif included with the OpenSuse
    ksh source. I confirmed the inner condition is true some of the time and
    the early return does not break any unit tests.
    krader1961 committed Jan 22, 2020
    Configuration menu
    Copy the full SHA
    2986f8b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    46d4981 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1fd82bd View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2020

  1. Configuration menu
    Copy the full SHA
    459a380 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2020

  1. Fix cd function and enable it in unit tests

    The old AST team implementation of an improved `cd` command has several
    problems when enabled for every interactive shell. Not least of which
    is that the approach of using an alias does not allow it to be, easily,
    overriden by a user defined `cd` function. It also fails to preserve some
    builtin `cd` command behavior. There may be other problems this doesn't
    fix. This is an experiment to see if we can augment commands like `cd`
    without having to write all behavior in the C language.  Something other
    shells, like fish, have managed for more than a decade.
    
    Fixes #1445
    krader1961 committed Jan 25, 2020
    Configuration menu
    Copy the full SHA
    3dfc236 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2020

  1. Rename three vars associated with cd related funcs

    Don't use global vars for the private data used by the cd related
    functions (pushd, nextd, etc.). Move them into the `.sh` namespace.
    
    Related #1445
    krader1961 committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    5000e7f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    43d1853 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2020

  1. Change default build type to "minsize"

    People (and distros) have been building ksh from this project using the
    default "debug" build type since we switched from Nmake to Meson. That
    results in a ksh program whose performance is far from optimal. So change
    the default build type. If a debugging enabled binary is needed, such as
    in a CI environment, it must be requested explicitly.
    
    Related #1449
    krader1961 committed Jan 31, 2020
    Configuration menu
    Copy the full SHA
    db54d36 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2020

  1. Fix typo in the project name

    The typo is harmless since the string is not used for anything but fix
    it since it is wrong and confusing.
    krader1961 committed Feb 1, 2020
    Configuration menu
    Copy the full SHA
    8cf92b2 View commit details
    Browse the repository at this point in the history
  2. Fix compiler error on OS X 10.6

    Mac OS X 10.6 (Snow Leopard) causes symbol `ERROR_dictionary` in
    src/lib/libdll/dlfcn.c to be evaluated. Since that symbol isn't defined it
    results in a compilation error. Add the identity mapping that is present
    in the rest of the source code.
    
    Fixes #1462
    krader1961 committed Feb 1, 2020
    Configuration menu
    Copy the full SHA
    f8290d2 View commit details
    Browse the repository at this point in the history