History log of /dragonfly/bin/sh/arith_yylex.c (Results 1 – 6 of 6)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2
# 3e3895bf 11-Sep-2020 Krzysztof Piecuch <piecuch@protonmail.com>

sh(1): bring sh from freebsd

I used freebsd@19bed3ae2eb256a2c68dabbcb77eff2835d569de.

* Write absolute path in command -vV and type
* Keep ignored SIGINT/SIGQUIT after set in a background job
* pri

sh(1): bring sh from freebsd

I used freebsd@19bed3ae2eb256a2c68dabbcb77eff2835d569de.

* Write absolute path in command -vV and type
* Keep ignored SIGINT/SIGQUIT after set in a background job
* print a newline when ^D quits sh
* Do not ignore INTOFF during a trap
* Fix description of the "\$" sequence for PS1
* Allow more scripts without #!
* Fix double INTON with vfork
* Assert INTOFF rather than applying it in ck*
* Remove remnants to compile out fc completely
* Fix a "may be unused" warning on mips-gcc
* remove duplicate el definition
* fix read builtin on 32-bit systems
* Improve performance of "read" built-in command when using a seekable
* Fix rare memory leak with SIGINT
* Do not use our custom completion function, it is not needed anymore
* Add set -o pipefail
* Send normal output from bind builtin to stdout
* Restore $((x)) error checking after fix for $((-9223372036854775808))
* Make sh(1) support \u in PS1. This removes one fork/exec on
interactive
* Send libedit "ferr" output to fd 2
* Fix an edge case when parsing large numbers which resulted in
inconsistent
* Do not place exported but unset variables into the environment
* Make sh(1) collapse $HOME into "~" in PS1.
* Remove -c string from set builtin documentation
* Fix ${param?} default error message
* Use 126 and 127 exit status for failures opening a script
* Unify EXERROR and EXEXEC
* Use exitstatus instead of exerrno to pass EXEXEC status
* Fix formal overflow in pointer arithmetic
* Describe how to prevent *.core files from being created using ulimit.
* Don't treat % specially in CDPATH
* Don't use padvance() for MAIL/MAILPATH
* Split CNL syntax category to avoid a check on state[level].syntax
* Allow unquoted newlines in word in ${param+word} etc.
* Don't have [ match any [[:class:]]
* Allow overriding VTABSIZE at compile-time.
* Refactor job status printing, preparing for -o pipefail and similar
* Move various structs from jobs.h to jobs.c
* Fix a few speelling errors
* Don't leak wait* implementation details from jobs.c
* Markup and spelling fixes
* Fix mandoc -Tlint warnings in bin/
* General further adoption of SPDX licensing ID tags.
* Remove broken #ifdef NOHACK code (related to sh -c).
* Ignore error when cd writes the directory actually switched to.
* Enable interrupts before executing EXIT trap and doing final flush.
* Call fc -e editor with interrupts enabled.
* Make sure to process SIGINT if SETINTON re-enables processing.
* Allow defining nofork builtins from builtins.def and move always-safe
ones there.
* Fix INTOFF leak when a redirection on a compound command fails.
* Keep output buffer across builtins.
* Ensure memout.bufsize matches allocated buffer, if it exists.
* Simplify output buffering.
* Fix '-' from quoted arithmetic in case/glob pattern range.
* Fix INTOFF leak after a builtin with different locale settings.
* Update TOUR and comments for some code changes, some of them old.
* Simplify handling of newlines in command substitution.
* Simplify setinteractive().
* Fix use after free when resetting an in-use alias.
* Fix unalias -a while an alias is currently in use.
* Reduce size of limits table.
* Remove an XXX comment: it is normal for builtins to use argptr.
* Remove global state from collate_range_cmp().
* Don't scan word twice in ${param=word}.
* Don't scan word twice in ${param#%##%%word}.
* Don't scan word twice in ${param+-word}.
* Remove unused function declaration for arith_lex_reset().
* Remove unused return value of subevalvar_misc().
* Get rid of global variable argbackq.
* Fix executing wrong command with ${unsetvar#$(cmdsubst)}$(cmdsubst).
* Fix crash if a -T trap is taken during command substitution.
* bin: normalize paths using SRCTOP-relative paths or :H when possible
* Remove empty Li
* Do not import IFS's value from the environment.
* Fix a clang warning.
* Path generation was not according to collate
* Back out non-collating [a-z] ranges.
* After removing collation for [a-z] ranges in r302512, do it here too.
* Improve descriptions in 'ulimit -a' output.
* Clarify the explanations for the hostname and FQDN entries.
* Match the descriptions of the \H and \h prompt string sequences to reality.
* Hopefully fix Coverity CID 1008328 (Out-of-bounds write) in /bin/sh.
* Handle empty hostname and $PWD when building prompt
* Write LINENO value to stack string directly.
* Merge the projects/release-pkg branch to head.
* Simplify code by removing variable bracketed_name.
* replace 0 with NULL for pointers.
* Fix use-after-free if a trap replaces itself.
* Fix copying uninitialized field 'special'.
* Fix handling of umtxp resource limit in sh(1)/ulimit(1), limits(1), add
* Avoid out-of-bounds access in setoptionbyindex() for 'set -o nolog'.
* Fix some dead stores.
* Remove a redundant STPUTC check.
* Don't trust that signal descriptions fit within 49 bytes.
* Fix set -v and multiline history after r295825.
* Don't hash alias name when there are no aliases.
* Optimize setprompt(0).
* Remove unnecessary flushouts while reading script.
* Rework code to remove '\0' from shell input.
* Don't allocate a redirtab if there are no redirections.
* Document 'cd -'.
* Constify internal representation in expand.c.
* Remove a global variable from cd.c.
* Use OLDPWD shell variable for 'cd -'.
* Clean a readonly local, even if the variable does not exist outside.
* Simplify some code related to positional parameters.
* Update associated state when restoring locals while leaving a function.
* Reduce size of options table.
* Ensure OPTIND=1 in subshell without forking does not affect outer env.
* Reduce size of builtins table.
* Remove redundant CTLQUOTEMARK checks.
* Reindent expandmeta().
* Perform pathname generation during the first expansion phases.
* Perform IFS splitting during the first expansion phases.
* Split subevalvar() in #/##/%/%% and =/? parts.
* sh/mknodes: Close files and check for errors when writing.
* Fix use-after-free when attempting to modify a read-only variable.
* Remove global state from nodes.c.
* Fix ""$@, which should not use the special case for "$@".
* Avoid copying argv for simple commands.
* Make struct arglist an array instead of a linked list.
* Allow empty << EOF markers.
* Fix read with escaped IFS characters at the end.
* Add set -o nolog.
* Fix out of bounds read when there is no ] after a [:class:].
* Don't create bad parse result when postponing a bad substitution error.
* Avoid negative character values from $'\Uffffffff' etc.
* Backslash-newline should not affect field splitting in read builtin.
* When setting option via long name, don't go via letter.
* libedit has supported multibyte encodings for a while.
* Fix some arithmetic undefined behaviour.

Taken-from: FreeBSD

show more ...


Revision tags: v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3, v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc, v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc, v4.2.4, v4.3.1, v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc
# 02d0b1ce 07-Jun-2015 Matthew Dillon <dillon@apollo.backplane.com>

sh - Sync to FreeBSD d038ee76 part 1/2

* Sync to FreeBSD d038ee76 25 Apr 2015.


Revision tags: v4.0.5, v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1, v3.6.0, v3.7.1, v3.6.0rc, v3.7.0, v3.4.3, v3.4.2, v3.4.0, v3.4.1, v3.4.0rc, v3.5.0
# f00eae14 18-Mar-2013 Peter Avalos <pavalos@dragonflybsd.org>

sh: Sync with FreeBSD:

* Expand assignment-like words specially for export/readonly/local.
* Remove unused variables.
* Reset pendingsigs before checking pending traps, not after.
* Track continued

sh: Sync with FreeBSD:

* Expand assignment-like words specially for export/readonly/local.
* Remove unused variables.
* Reset pendingsigs before checking pending traps, not after.
* Track continued jobs (even if not continued by bg or fg).
* Inline waitproc() into its only caller.
* Fix EINTR race condition in "wait" and "set -T" using sigsuspend().
* use setinputfile instead of open/setinputfd.
* Prefer internal nextopt() to libc getopt().
* Use C99 flexible array instead of accessing array beyond bounds.
* Fix two issues when an alias is redefined.
* Detect and flag write errors on stdout in builtins.
* Prefer strsignal() to accessing sys_siglist directly.
* Don't lose $? when backquoted command ends with semicolon or newline.
* Fix crash when parsing '{ } &'.
* Pass $? to command substitution containing compound/multiple commands.
* Simplify cd-hash interaction.
* Remove mkinit's initialization routine.
* Move some stackmarks to fix high memory usage in some loops.
* Show negated commands (!) in jobs output.
* Prefer our character classification functions to <ctype.h>.
* Expand here documents in the current process.
* Do not test for digit_contig in mksyntax.
* Simplify mksyntax
* Fix a crash with the stackmark code.
* If a SIGINT or SIGQUIT interrupts "wait", return status 128+sig.
* When executing a trap, keep exit status along with evalskip.
* Update $FreeBSD$ to include SVN id.

Obtained-from: FreeBSD

show more ...


Revision tags: v3.2.2, v3.2.1, v3.2.0, v3.3.0, v3.0.3, v3.0.2, v3.0.1, v3.1.0, v3.0.0
# 86d7f5d3 26-Nov-2011 John Marino <draco@marino.st>

Initial import of binutils 2.22 on the new vendor branch

Future versions of binutils will also reside on this branch rather
than continuing to create new binutils branches for each new version.


Revision tags: v2.12.0, v2.13.0, v2.10.1, v2.11.0, v2.10.0
# cb26c088 16-Apr-2011 Peter Avalos <pavalos@dragonflybsd.org>

sh: Reduce diffs to FreeBSD in the arith code.

Obtained-from: FreeBSD


# 99512ac4 07-Feb-2011 Peter Avalos <pavalos@dragonflybsd.org>

sh: Sync with FreeBSD

This is a combination of 198 commits that enhances performance,
standards compliance, and bug fixes:

-Fix exit status of case statement.
-sh.1: Update markup.
-Fix PWD values.

sh: Sync with FreeBSD

This is a combination of 198 commits that enhances performance,
standards compliance, and bug fixes:

-Fix exit status of case statement.
-sh.1: Update markup.
-Fix PWD values.
-Fix null pointer dereferences.
-Fix bugs where arithmetic expansion$((...)) was truncated
-Pass the correct flags to expandarg() for NFROMFD and NTOFD.
-Add __dead2
-Fix $? at the first command of a function.
-Report error messages to stderr instead of stdout.
-Make alias builtin POSIX compliant.
-Improve the IFS handling of the read built-in.
-Don't let empty lines overwrite the result of the last command with 0.
-Fix the eval command in combination with set -e.
-Make read's timeout (-t) apply to the entire line.
-align local ckmalloc() with malloc(3) by using a size_t
-style(9) to enhance readability
-explicit 'unsigned int' instead of just 'unsigned'
-Mention the range for the exit status for the exit builtin
-Don't skip forking for an external command if any traps are active.
-Avoid leaving unnecessary waiting shells.
-Properly flush input after an error in backquotes
-Fix some issues with quoted output
-Fix race condition in noclobber option
-Improve handling of setjmp/longjmp volatile
-Do not fork for EV_EXIT.
-Quote -x tracing output so it is unambiguous.
-Designate special builtins as such in command -V and type.
-Fix crash when undefining or redefining an executing function.
-Fix memory leak when using a variable in arithmetic like $((x)).
-Use sigaction instead of signal/siginterrupt combination.
-Allow a newline before "in" in a for command, as required by POSIX.
-Some changes to stderr flushing.
-Handle current work directories of arbitrary length.
-trap: do not consider a bad signal name a fatal error.
-Ensure the same command input file is on top after execing builtin.
-Fix various things about SIGINT handling.
-Fix some cases where file descriptors from redirections leak to programs.
-Remove setting variables from dotcmd/exportcmd.
-Fix a memory leak when calling . with variable assignments.
-Constify various strings.
-Do not consider a tilde-prefix with expansions in it.
-Do not run callers' exception handlers in subshells.
-Remove declaration of function that no longer exists.
-WARNS fixes to reduce diffs to FreeBSD
-arith: Return only 0 and 1 from && and ||.
-Fix memory leak when parsing backticks (``).
-Ensure funcnest is decremented if there's an error in the function.
-Allow command -pv and command -pV
-Fix some bugs with backquoted builtins.
-Send the "not found" message for builtin <cmd> to redirected fd 2.
-Do not stat() $MAIL/$MAILPATH in non-interactive shells.
-Fix expansion of \W in prompt strings when the working directory is "/".
-Improve the command builtin:
-Make sure to popredir() even if a special builtin caused an error.
-Make sure to popredir() even if a function caused an error.
-Make parsebackq a function instead of an emulated nested function.
-Do not abort on a redirection error if there is no command word.
-Do not abort on a redirection error on a compound command.
-Treat unexpected newlines in substitutions as a syntax error.
-Fix various things about expansions.
-Remove special handling for ' and " in arithmetic.
-Allow quoting pattern match characters in ${v%pat} and ${v#pat}.
-Do tilde expansion in substitutions.
-Automatically enable -o emacs in interactive shells with terminals.
-On startup of the shell, use PWD from the environment if it is valid.
-Use stalloc for arith variable names.
-Apply locale vars on builtins, recognize LC_MESSAGES as a locale var.
-Have only one copy of _PATH_STDPATH in the binary.
-Fix "reserved word" vs "keyword" inconsistency.
-Fix pathname expansion with quoted slashes like *\/.
-Reap any zombies before forking for a background command.
-Rework documentation of shell variables.
-Recognize "--" in . and exec.
-Change interaction of command substitution and here documents.
-Fix a crash if a heredoc was not properly ended and parsing continued.
-Pass TERM changes to libedit.
-Pass through SIGINT from a child if interactive and job control is enabled.
-Forget about terminated background processes sooner.
-Use $PWD instead of getcwd() for the \w and \W prompt expansions.
-Allow a background command consisting solely of redirections.
-Fix crash due to uninitialized here-document.
-Return 0 from eval if no command was given.
-Remove unnecessary duplicate letters in mksyntax.c
-Fix heap-based buffer overflow in pathname generation.
-Fix shadowing of sigset.
-Fix break/continue/return sometimes not skipping the rest of dot script.
-Add a brief summary of arithmetic expressions.
-Remove remnants of '!!' to negate pattern.
-Do not use locale for determining if something is a name.
-Get rid of some magic numbers.
-Improve comments in expand.c.
-Fix 'read' if all chars before the first IFS char are backslash-escaped.
-Remove xrefs for expr(1) and getopt(1).
-Apply variable assignments left-to-right in bltinlookup().
-Fix exit status if return is used within a loop condition.
-Suggest that DEBUG_FLAGS be used to enable extra debugging
-Make DEBUG traces 64-bit clean.
-Remove the "STATIC" macro
-Fix a bug in STACKSTRNUL()
-Clarify subshells/processes for pipelines.
-There cannot be a TNOT in simplecmd(), remove checks.
-Change ! within a pipeline to start a new pipeline instead.
-Check whether dup2 was successful for >&FD and <&FD.
-Make sure defined functions can actually be called.
-Do not allow overriding a special builtin with a function.
-Ignore double-quotes in arithmetic rather than treating them as quotes.
-Make double-quotes quote a '}' inside ${v#...} and ${v%...}.
-Only accept a '}' inside ${v+-=?...} if double-quote state matches.
-Do IFS splitting on word in ${v+word} and ${v-word}.
-Fix some issues with CTL* bytes and ${var#pat}.
-Error out on various specials/keywords in the wrong place in backticks.
-Detect various additional errors in the parser.
-Reject function names ending in one of !%*+-=?@}~
-Tweak some string constants to reduce code size.
-Use iteration instead of recursion to evaluate semicolon lists.
-Reindent evaltree().
-Correct synopsis and make precise how $0 is set.
-Fix some issues with aliases and case, by importing dash checkkwd code.
-Modernize the introduction a bit.
-Remove unused man page for echo builtin.
-Do the additional actions if 'local -' restore changes -i/-m/-E/-V.
-Add binary buffered output for use by the printf builtin.
-document printf builtin
-Code size optimizations to buffered output.
-Remove the check that alpha/name/in_name chars are not CTL* bytes.
-Fix confusing behaviour if chdir succeeded but getcwd failed in cd -P.
-Code size optimizations to "stack string" memory allocation
-jobs -p: Do not ask the kernel for the pgid.
-Improve jobs output of pipelines.
-POSIX says there should not be a space between Done and (exitstatus).
-Improve internal-representation-to-text code to avoid binary output.
-Use vsnprintf() rather than crafting our own in fmtstr().
-Replace some macros and repeated code in expand.c with functions.
-Remove the herefd hack.
-Various simplifications to jobs.c
-Remove duplicate check, turning dead code into live code.
-Fix corruption of command substitutions with special chars after newline
-Remove dead code.
-arith: Disallow decimal constants starting with 0 (containing 8 or 9).
-Make warnings in the printf builtin non-fatal.
-Add a function to print warnings (with command name and newline).
-Add kill builtin.
-Explain why it is a bad idea to use aliases in scripts.
-Allow arbitrary large numbers in CHECKSTRSPACE.
-Make expansion errors in optimized command substitution non-fatal.
-Don't do optimized command substitution if expansions have side effects.
-Properly restore exception handler in fc.
-Avoid side effects from builtins in optimized command substitution.
-Check if dup2 for redirection from/to a file succeeds.
-Check readonly status for assignments on regular builtins.
-Do not call exitshell() from evalcommand() unless evalcommand() forked itself
-Make exit without parameters from EXIT trap POSIX-compliant.
-Remove special %builtin PATH entry.
-Make 'trap -l' look like 'kill -l'.
-Fix some things about -- in trap.
-If exit is used without args from a trap action, exit on the signal.
-Fix signal messages being sent to the wrong file sometimes.
-Send messages about signals to stderr.
-Return only 126 or 127 for execve() failures.
-Make sys_signame upper case.
-Remove special code for shell scripts without magic number.
-Do not try to execute binary files as scripts.
-Forget all cached command locations on any PATH change.
-Fix two things about {(...)} <redir.
-Import arithmetic expression code from dash.
-Install /bin/sh safely.

Obtained-from: FreeBSD

show more ...