Age | Commit message (Collapse) | Author |
|
Reduce using some of the unneeded sys/* headers too. This makes it slightly
more portable or easier to port also.
|
|
This reverts commit db1dcafd03997127f2cbc82376e2cc8df9b77356.
This is needed. Tested on an (old) Slackware 11 install.
|
|
This include is not needed. It was intended for ssize_t but this is already
defined by stdio.h for getline().
|
|
This will detect write errors sooner.
|
|
This also makes the programs exit with a non-zero status when a read or write
error occurs.
This makes checking the exit status more reliable in scripts.
A simple example to simulate a disk with no space left:
curl -s 'https://codemadness.org/atom.xml' | sfeed > f
/mnt/test: write failed, file system is full
echo $?
0
Which now produces:
curl -s 'https://codemadness.org/atom.xml' | sfeed > f
/mnt/test: write failed, file system is full
write error: <stdout>
echo $?
1
Tested with a small mfs on OpenBSD, fstab entry:
swap /mnt/test mfs rw,nodev,nosuid,-s=1M 0 0
|
|
|
|
No functional or performance difference (intended) because these programs are
not threaded.
|
|
These are BSD functions.
- HaikuOS now compiles without having to use libbsd.
- Tested on SerenityOS (for fun), which doesn't have these functions (yet).
With a small change to support wcwidth() sfeed works on SerenityOS.
|
|
Handle it appropriately in the context of each format tool. Output the item but
keep it blanked.
NOTE: maybe in sfeed_twtxt it should use the current time instead?
|
|
- remove a check that has no use/can never happen.
- remove the return value as it's unused and the input size is known.
- fix an old comment that doesn't reflect what the function does anymore.
|
|
|
|
|
|
|
|
|
|
Thanks trqx for pointing it out!
|
|
|