Age | Commit message (Collapse) | Author |
|
89a8d00e470f1999a62ceea81269af2f39c655ba broke -E by switching to a prefix
match. 4e0d246ec98f2576d52eb5fd70cd6e86d542e2e4 fixed it again. Add the
missing regression test.
|
|
|
|
(it returns a malloc), and doesn't match the object lifetime of getbasename()
(which always returns some or all of its argument string). The dirname() in
libc modifies its argument string, but that's what posix says to do:
https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/functions/dirname.html
so I guess we can live with it.
|
|
In order to be used as drop in replacement for dirname()
If path is a null pointer or points to an empty string,
dirname() shall return a pointer to the string "." .
|
|
|
|
|
|
add: linelist unload
fix: proper utf8 handling on insert mode backspace
fix: free allocated data at exit
cleanup: rename some variables to be describive but short
cleanup: reorganize some variables in main
|
|
Added: parsing of redirectation responses, will now follow redirectation
path until maximum of 10 jumps. This will probably lead to server
advertising user the https url.
|
|
|
|
|
|
|
|
We need two spaces between filenames because that is the convention
followed by other implementations. More importantly, if we do not have
two spaces, certain Unicode file names cause filenames to run together.
In Unicode, combining characters come before the character they modify.
If a filename ends in a combining character, the combining character
attaches to the space that follows it, causing the space not to be
visible. Having a two-space gap stops the above issue from happening.
For context and a bit more information, see mailing list link below.
https://www.mail-archive.com/toybox@lists.landley.net/msg05986.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The function loopback_setup(), after copying the loopback device name
with xstrncpy(), ensures the null-termination of the string by forcing
its last byte to 0.
Unfortunately, this operation:
- was probably intended to null-terminate dest instead;
- does not affect the program execution because src is free()d right
after;
- if the size of src is smaller than the offset of the written zero, it
modifies an unknown byte in the heap.
Drop the null-termination line to fix the issue: xstrcpy() automatically
null-terminates dest, or fails if the size of src is bigger than the the
requested number of bytes to copy.
Signed-off-by: Alessio Balsini <balsini@android.com>
|
|
|
|
|
|
|
|
Inline array becomes garbage outside the if.
|
|
The <netdb.h> functions have their own errno :-(
|
|
and silence "killed" messages from the shell by forking in a subshell.
|
|
These really should go in generated, but generated should be $GENERATED
and I need to find a way to set that so Makefile and scripts/make.sh can
use it from the same source. Right now cross.sh isn't sourcing .configure
and I don't really want to add it for this, so...
|
|
out clang's __has_include(), and && shorts out the eval for gcc.
|
|
The downside is we don't use assembly optimized libc comparison functions,
but the common case is short/no matches until full match. Probably net win.
|
|
Don't run the command with no arguments if we run out of input but
have already run the command at least once. The implementation of "run
the command at least once (unless -r was supplied)" wasn't taking into
account whether or not this was our first time round the loop.
Fix the exit value, and the -- already documented but not implemented --
behavior if a child exits with status 255.
Also extend the tests to cover these cases, plus cases I broke while
coming up with the fix. Add more tests to convince myself that we've
correctly interpreted how -s is supposed to behave, and fix the corner
cases at the bottom end of the range.
This fixes some issues we were seeing trying to build the Android SDK
for (and more importantly, on) macOS.
|
|
When user builds toybox CFG_TOYBOX_I18N disabled and tries to list
folder contents with multibyte characters other than UTF-8 ls might
seqfault since wcrtomb returns -1
while locale set to fi_FI-UTF-8 disable CFG_TOYBOX_I18N
touch őőőőaaőő
ls
|
|
fix: force redraw after :set (no)list
fix: force redraw after insert
fix: split on zero cursor position
fix: yank and push with utf-8 content
|
|
and cleanup hostname to only call gethostname() once.
It passes the one test in test_hostname, if that helps.
|
|
|
|
|
|
|
|
|
|
Scroll visual buffer up and down using standard escapes when content
has not changed, instead of redrawing every keypress.
Sidescroll now moves all the lines instead of only cursor one.
Side scrolling long lines unfortunately causes redraw to whole screen.
-Jarno
|
|
We're inconsistent about whether the option help below should be just `-t`
or `-t DIR`, but the majority of commands _don't_ repeat their argument,
so I've left that as-is for now.
|
|
I must have lost this line somehow when I moved the patch from my AOSP
tree to a toybox tree. (But the ln tests passed on the host because I
was using coreutils ln there :-( )
|
|
|
|
|
|
|
|
|
|
|
|
Required by the new `ln -t` test if it's to pass on an all-toybox
system :-)
|
|
Just re-tar the extracted file and check we get the expected result.
|
|
|
|
|
|
|
|
|