History log of /openbsd-src/usr.bin/patch/inp.c (Results 1 – 25 of 49)
Revision Date Author Comments
# 3aaa63eb 28-Jun-2019 deraadt <deraadt@openbsd.org>

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

show more ...


# f4147939 26-Apr-2018 guenther <guenther@openbsd.org>

Use <fcntl.h> instead of <sys/file.h> for open() and friends.
Delete a bunch of unnecessary #includes and sort to match style(9)
while doing the above cleanup.

ok deraadt@ krw@


# 6fba1986 25-Mar-2017 deraadt <deraadt@openbsd.org>

parameter "lines_allocated" is a local pointer and should not be confused
with the global by the same name, so rename it "lines_allocatedp".


# 9208e1c3 19-Jul-2016 deraadt <deraadt@openbsd.org>

Cleanup close(open idioms.
ok krw


# f24baa2d 11-Nov-2015 deraadt <deraadt@openbsd.org>

creat() -> open equiv; from Frederic Nowak


# 7e39cfac 26-Jul-2015 millert <millert@openbsd.org>

Remove support for automatically checking files out of RCS. The
behavior is confusing to users and even GNU patch no longer does
it by default. OK krw@ guenther@


# 1357284a 05-Feb-2015 millert <millert@openbsd.org>

Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@


# c92d5c63 09-Dec-2014 tobias <tobias@openbsd.org>

Fix division by zero for files with long lines (> 1024) in Plan B mode
by supporting arbitrarily long lines just like Plan A does.

ok tedu


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

Prevent null pointer dereference on empty input files when diff requires
a specific version.

ok millert


# 0529800e 22-Nov-2014 tobias <tobias@openbsd.org>

Remove SCCS support. For this to work, we would need "get", which we don't
even have in ports. XSI functionality of POSIX, therefore optional.

ok deraadt, schwarze, tedu


# e1682197 15-Nov-2014 tobias <tobias@openbsd.org>

Call munmap with the same size argument as mmap.

ok millert, otto


# c905b261 08-Oct-2014 doug <doug@openbsd.org>

userland reallocarray audit.

Replace malloc() and realloc() calls that may have integer overflow in the
multiplication of the size argument with reallocarray().

ok deraadt@


# 6cd4fad2 26-Nov-2013 deraadt <deraadt@openbsd.org>

unsigned char casts for ctype
ok krw


# 9232b9af 10-Apr-2012 ajacoutot <ajacoutot@openbsd.org>

Don't try to mmap a zero length file, from NetBSD.
Needed after the recent mmap(2) change.

ok ariane@


# 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 ...


# 5e2529bc 11-Mar-2006 otto <otto@openbsd.org>

type police and assorted cleanup. From Lionel Fourquaux; ok ray@


# 82828006 14-Nov-2005 miod <miod@openbsd.org>

constuct -> construct


# ec347eb8 05-Aug-2004 deraadt <deraadt@openbsd.org>

spacing


# 4faf53bb 08-Dec-2003 mickey <mickey@openbsd.org>

MAP_FILE is the default and MAP_PRIVATE has to be given or produces evil warnings in debug kernel


# 5121f91b 21-Nov-2003 mickey <mickey@openbsd.org>

madvise(sequential) the mmap()ed file and plug an fd leak on mmap() failure; millert@ ok


# 1287dded 28-Sep-2003 otto <otto@openbsd.org>

realloc(3) cleanup.

ok cloder@ tedu@


# ddf7b806 15-Aug-2003 otto <otto@openbsd.org>

Add license from patch.c to original source files missing a license.

ok deraadt@


# 5239a639 12-Aug-2003 otto <otto@openbsd.org>

Fix no newline at end of file case for Plan B.

ok millert@ tedu@


# 9f4ed7c2 10-Aug-2003 otto <otto@openbsd.org>

Do not add an extra newline at the end if the last line of the input
file contains no newline and the diff does not touch the last line.
Contributions from millert@.

ok millert@ tedu@


# f6d204f0 08-Aug-2003 otto <otto@openbsd.org>

Avoid scanning the input file twice.

ok millert@ tedu@


12