| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
The user supplies field numbers with the -o, -1 and -2 options.
It feels more natural to convert these to 0-based field indices
in the code.
Saves 32-48 bytes.
Signed-off-by: Ron Yorston <rmy@pobox.com>
|
| |
|
|
|
|
|
|
|
|
| |
When splitting the fields of a line, keep the string allocated
for the line and make the 'fields' array point into it rather
than allocating a new string for each field.
Saves 48 bytes.
Signed-off-by: Ron Yorston <rmy@pobox.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reduce the amount of duplicated code in readfields() by handling
a pushed back line inside the main loop, with a flag to indicate
the first pass through the loop.
Replace some memcpy() calls with structure assignments.
Fix a bug in the code to increase the size of the 'lines' array.
It set the capacity to either 8 or 0.
Saves 112-128 bytes.
Signed-off-by: Ron Yorston <rmy@pobox.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adopt some BusyBox idioms in join_main(). In particular:
- The '-a' and '-v' options are mutually exclusive. Enforce this
in getopt32() instead of by hand. Also, since they're mutually
exclusive we don't need a distinct list for each.
- Control some clean-up code with ENABLE_FEATURE_CLEAN_UP.
There are also a few cosmetic changes.
Saves 204-256 bytes.
Signed-off-by: Ron Yorston <rmy@pobox.com>
|
| |
|
|
|
|
|
|
| |
- Update the size estimate to follow upstream's methodology
- Disable the applet by default until it's accepted upstream
- Add a minimal test script, stealing an example from POSIX
|
| | |
|
|
|
Join joins two sorted input files on matching fields. It supports the
options required by POSIX, including the combinatorial output for
equal fields.
Adds 3 KiB
|