History log of /freebsd-9.3-release/gnu/usr.bin/patch/patch.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 191910 08-May-2009 sepotvin

Change the internal buffer used to store input lines from a static buffer
to a dynamically allocated one in order to support input lines of
arbitrary length.

Approved by: kan (mentor)
MFC after: 1 month


# 105017 12-Oct-2002 kris

Prevent stack-smashing buffer overflows in -D and -r options by using
buffer-safe string functions. The rest of the code is still probably
unsafe.

MFC after: 1 week


# 95601 27-Apr-2002 gad

Add many prototypes and ANSI-ize 'patch. Not a complete job of it, but it gets
our patch to look a little more like NetBSD's, and has the nice characteristic
that the object code is exactly the same after the change as before it (even in
patch.c and pch.c, which have pesky 'assert' statements in them).

Reviewed by: /sbin/md5 on i386, alpha, sparc64
MFC after: 3 days


# 90379 08-Feb-2002 mike

Add -i option (SUSv3) to patch(1). This allows one to specify a
patch file on command line instead of stdin.

Submitted by: Joseph Mallett <jmallett@xMach.org>
MFC after: 1 month


# 64156 02-Aug-2000 kbyanc

Fix previous commit such that only -S/--skip ignores errors when applying
a patch, returning -f/--force and -t/--batch to their previous semantics.

Pointed out by: asami


# 64120 02-Aug-2000 kbyanc

Fix patch such that skipping files does not count as a failure.
Previously, using -S/--skip, -f/--force, or -t/--batch to skip a patch in
a patchset still registers a failure which causes patch to return a
non-zero exit code. This is particularly undesirable with regards to
ports as there is no way to ignore the non-zero code. (Luckily, we don't
currently have any ports that make use of any of these options.)

The PR (yes, my own) is slightly incorrect: It states that -f does indeed
properly skip patches. It does, but it still sets the failure flag causing
patch to return non-zero.

PR: 19638
Submitted by: kbyanc@posi.net


# 50965 05-Sep-1999 peter

Clean up some $Log$ debris, including some real messes.


# 50488 28-Aug-1999 peter

$Header$ -> $FreeBSD$


# 32698 22-Jan-1998 ache

Add PATCH_INDEX_FIRST environment variable to do the same as -I option


# 32674 21-Jan-1998 ache

Update usage line with new option


# 32673 21-Jan-1998 ache

Add -I or --index-first option to take Index: precedence over context diff,
as it was in hacked FreeBSD version


# 32672 21-Jan-1998 ache

Resurrect patch 2.1 without FreeBSD Index: hack