History log of /openbsd/usr.bin/paste/paste.c (Results 1 – 25 of 27)
Revision Date Author Comments
# d7259957 04-Dec-2022 cheloha <cheloha@openbsd.org>

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument.

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument. We can
handle this case with the "default" failure case with no loss of
legibility. Hence, remove all the redundant "case '?':" lines.

Prompted by dlg@. With help from dlg@ and millert@.

Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2

ok naddy@ millert@ dlg@

show more ...


# 5017b69c 04-Aug-2018 schwarze <schwarze@openbsd.org>

fix a glitch in rev. 1.24: getline(3) returns ssize_t, not size_t;
pointed out by Andre Stoebe <as at nul not space>


# 194d0062 04-Aug-2018 schwarze <schwarze@openbsd.org>

obvious KNF: avoid '!' for tests of non-boolean variables,
__dead void usage, return from main and return is not a function,
err(1, NULL) after malloc failure, and garbage collect (void) casts
on fun

obvious KNF: avoid '!' for tests of non-boolean variables,
__dead void usage, return from main and return is not a function,
err(1, NULL) after malloc failure, and garbage collect (void) casts
on functions that usually do not need return value checks

show more ...


# 2e7cd69a 04-Aug-2018 schwarze <schwarze@openbsd.org>

Use POSIX getline(3) rather than the non-standard and error-prone fgetln(3).
In part based on a diff from Lauri Tirkkonen <lotheac at iki dot fi>.
While here, significantly simplify sequential().
No

Use POSIX getline(3) rather than the non-standard and error-prone fgetln(3).
In part based on a diff from Lauri Tirkkonen <lotheac at iki dot fi>.
While here, significantly simplify sequential().
No objection when shown on tech@.

show more ...


# 1ada7db4 02-Jan-2018 guenther <guenther@openbsd.org>

When invoked with no file arguments, display usage and fail instead of
silently doing nothing.

suggested by Klemens Nanni (kl3 (at) posteo.org), from FreeBSD r92772
ok millert@


# 56b1f53f 09-Dec-2015 mmcc <mmcc@openbsd.org>

Remove NULL-checks before free(). ok tb@


# 0bd1216c 09-Oct-2015 deraadt <deraadt@openbsd.org>

Change all tame callers to namechange to pledge(2).


# 23460c7e 07-Oct-2015 deraadt <deraadt@openbsd.org>

tame "stdio rpath", satisfies the fopen cases
ok semarie


# 0d86349c 25-Nov-2014 tobias <tobias@openbsd.org>

Release file descriptors as soon as they are not needed anymore.

ok millert


# 6e6462b9 12-Aug-2010 tedu <tedu@openbsd.org>

make fgetln fixups look like the man page. correct a pair of brances and
some other style tweaks


# 043fbe51 27-Oct-2009 deraadt <deraadt@openbsd.org>

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(th

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

show more ...


# 03cb09c0 06-Aug-2007 sobrado <sobrado@openbsd.org>

the ellipsis is not an optional argument; while here, sync the usage
and synopsis of commands

lots of good ideas by jmc@

ok jmc@


# bae30663 04-May-2006 ray <ray@openbsd.org>

Use queue(3) macros instead of custom queue.

OK beck@


# f7882a9e 10-Oct-2004 mickey <mickey@openbsd.org>

use err/warn


# 70ef01f6 10-Jul-2003 david <david@openbsd.org>

add missing includes
ok deraadt@ tedu@


# 1837a5ca 10-Jun-2003 deraadt <deraadt@openbsd.org>

mostly ansi cleanup; pval ok


# f75387cb 03-Jun-2003 millert <millert@openbsd.org>

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# c72b5b24 16-Feb-2002 millert <millert@openbsd.org>

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be don

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.

show more ...


# c0932ef1 19-Nov-2001 mpech <mpech@openbsd.org>

kill more registers

millert@ ok


# c9453828 07-Jun-2000 aaron <aaron@openbsd.org>

Check return value of malloc(). Also make the code clearer with respect to
setting lbuf = NULL; millert@ ok


# 74ccaa37 24-Aug-1999 aaron <aaron@openbsd.org>

better fix; now if the last line in a file stream does not contain a newline,
construct a null-terminated copy of the buffer returned by fgetln() and process
it as normal


# f523d398 23-Aug-1999 aaron <aaron@openbsd.org>

fgets() -> fgetln(). When reading files like this, the notion of a `line' is
more appropriate than C strings. Now paste won't die if it encounters null
characters. If the last line in the stream does

fgets() -> fgetln(). When reading files like this, the notion of a `line' is
more appropriate than C strings. Now paste won't die if it encounters null
characters. If the last line in the stream does not contain a newline, we now
say "incomplete line" instead of lying about "line too long". fgetln() uses
realloc, so now we're not limited to POSIX_LINE_MAX.

show more ...


# 2ed5cd90 16-Nov-1998 deraadt <deraadt@openbsd.org>

more -Wall


# 180acc8f 17-Jan-1997 millert <millert@openbsd.org>

r?index -> strr?chr


# 72799b18 15-Jan-1997 millert <millert@openbsd.org>

getopt(3) returns -1 when out of args, not EOF, whee!


12