History log of /freebsd-9.3-release/gnu/usr.bin/patch/pch.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)


# 197259 16-Sep-2009 sepotvin

The buffer returned by fgenln is not a "C" string and might not be NUL
terminated. Make sure that it is before using it.

Reviewed by: marck@
MFC after: 3 days


# 196459 23-Aug-2009 ed

Add support for diffs generated by Perforce.

It basically picks the filenames from the "====" line and strips off the
# revision number.


# 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


# 97028 20-May-2002 gad

Change parts of the source code to make it closer to style(9), mainly
changing indentation and some comments. Main goal is not perfect style,
but just to reduce differences with NetBSD. The object code is exactly
the same after this change as before it (except for assert() statements
which have moved).

Reviewed by: /sbin/md5 on i386
Obtained from: NetBSD


# 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


# 95514 26-Apr-2002 gad

Modify our 'patch' utility to recognize the
\ No newline at end of file
line that some versions of diff print out if the last line of the two files
are different, and one of the two files does not have a newline character
on that last line.

This change is still somewhat under discussion in -arch and -standards, but I
want to commit it to -current today so I'd have the chance to MFC it to -stable
before the code freeze for 4.6-release (which would be May 1st).

Note: the related change to 'diff' (so it might *generate* that line) is NOT
expected to be included in 4.6-release. We can debate that change later.

Obtained from: NetBSD (1.13 of basesrc/usr.bin/patch/pch.c, by kristerw)
MFC after: 4 days


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


# 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