summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/patch
Commit message (Collapse)AuthorAgeFilesLines
* Remove our hacked GNU patch.Pedro F. Giffuni2013-09-0318-4808/+0
| | | | | | | | | | | | | | The old (2.1) GNU patch has outlived its days. The major local changes have been moved into the less restrictedly licensed patch(1) we adopted in usr.bin/ . A much newer version of GNU patch is available in the ports tree (devel/patch). Disconnect from the build and remove. Notes: svn path=/head/; revision=255191
* Drop build option switch for the older GNU patch.Pedro F. Giffuni2013-08-291-6/+0
| | | | | | | | | | | As promised, drop the option to make the older GNU patch the default. GNU patch is still being built but something drastic may happen to it to it before Release. Notes: svn path=/head/; revision=255014
* Make the BSD-licensed patch the default.Pedro F. Giffuni2013-07-261-3/+3
| | | | | | | | | | | | | | | | | | The BSD-licensed patch(1) command has matured and it's behaviour can be considered equivalent to the older version of GNU patch in the tree. The switch has been extensively tested [1] and only two ports presented regressions, which have since been fixed. For convenience a new WITH_GNU_PATCH option is available, but it will likely be removed in the near future. PR: 176313 Approved by: portmgr Notes: svn path=/head/; revision=253689
* Properly handle input lines containing NUL characters such that pgets()David E. O'Brien2013-07-021-1/+1
| | | | | | | | | | accurately fills the read buffer. Callers of pgets() still mis-process the buffer contents if the read line contains NUL characters, but this at least makes pgets() accurate. Notes: svn path=/head/; revision=252513
* Make it so that 'patch < FUBAR' and 'patch -i FUBAR' operate the same.David E. O'Brien2013-07-021-2/+7
| | | | | | | | | | The former makes a copy of stdin, but was not accurately putting the content of stdin into a temp file. This lead to the undercounting the number of lines in hunks containing NUL characters when reading from stdin. Thus resulting in "unexpected end of file in patch" errors. Notes: svn path=/head/; revision=252512
* - Add a BSD-licensed patch, ported by Pedro F. Giffuni (pfg) fromGabor Kovesdan2013-01-291-1/+12
| | | | | | | | | | | DragonflyBSD and install it as bsdpatch. WITH_BSD_PATCH makes it default and installs GNU patch as gnupatch. Submitted by: pfg Obtained from: The DragonflyBSD Project Notes: svn path=/head/; revision=246074
* The buffer returned by fgenln is not a "C" string and might not be NULStephane E. Potvin2009-09-162-1/+3
| | | | | | | | | | terminated. Make sure that it is before using it. Reviewed by: marck@ MFC after: 3 days Notes: svn path=/head/; revision=197259
* Add support for diffs generated by Perforce.Ed Schouten2009-08-231-0/+24
| | | | | | | | It basically picks the filenames from the "====" line and strips off the # revision number. Notes: svn path=/head/; revision=196459
* Change the internal buffer used to store input lines from a static bufferStephane E. Potvin2009-05-086-53/+74
| | | | | | | | | | | to a dynamically allocated one in order to support input lines of arbitrary length. Approved by: kan (mentor) MFC after: 1 month Notes: svn path=/head/; revision=191910
* Get rid of a spurious "the".Daniel Harris2004-03-181-1/+1
| | | | | | | | | PR: 64081 Submitted by: Chris Pepper <pepper@reppep.com> MFC after: 1 day Notes: svn path=/head/; revision=127185
* Remove getopt*.c, we already have compatible getopt_long() in libcAndrey A. Chernov2004-02-174-1035/+1
| | | | Notes: svn path=/head/; revision=125910
* Since I'm having so much fun with const, beat my head against the wallPeter Wemm2003-10-261-3/+3
| | | | | | | some more. Make this compile cleanly. Notes: svn path=/head/; revision=121535
* returned length can exceed the limits of type charJohn W. De Boskey2003-07-291-1/+1
| | | | | | | | | Submitted by: blc@bsdwins.com Approved by: gad MFC after: 1 week Notes: svn path=/head/; revision=118136
* Prevent stack-smashing buffer overflows in -D and -r options by usingKris Kennaway2002-10-132-6/+10
| | | | | | | | | | buffer-safe string functions. The rest of the code is still probably unsafe. MFC after: 1 week Notes: svn path=/head/; revision=105017
* Change parts of the source code to make it closer to style(9), mainlyGarance A Drosehn2002-05-213-1036/+1101
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=97028
* Add many prototypes and ANSI-ize 'patch. Not a complete job of it, but it getsGarance A Drosehn2002-04-2814-263/+221
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=95601
* Add FreeBSD id's to these files, in advance of a separate update.Garance A Drosehn2002-04-284-3/+18
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=95600
* Modify our 'patch' utility to recognize theGarance A Drosehn2002-04-261-0/+64
| | | | | | | | | | | | | | | | | | | | \ 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 Notes: svn path=/head/; revision=95514
* Add -i option (SUSv3) to patch(1). This allows one to specify aMike Barcroft2002-02-082-3/+17
| | | | | | | | | | patch file on command line instead of stdin. Submitted by: Joseph Mallett <jmallett@xMach.org> MFC after: 1 month Notes: svn path=/head/; revision=90379
* Restore vendor CVS keywords; eliminate troff(1) warnings.Ruslan Ermilov2001-07-121-1/+3
| | | | Notes: svn path=/head/; revision=79632
* MAN[1-9] -> MAN.Ruslan Ermilov2001-03-271-3/+5
| | | | Notes: svn path=/head/; revision=74861
* Add `_PATH_DEVZERO'.David E. O'Brien2000-12-091-2/+6
| | | | | | | Use _PATH_* where where possible. Notes: svn path=/head/; revision=69793
* Fix previous commit such that only -S/--skip ignores errors when applyingKelly Yancey2000-08-021-0/+7
| | | | | | | | | a patch, returning -f/--force and -t/--batch to their previous semantics. Pointed out by: asami Notes: svn path=/head/; revision=64156
* Fix patch such that skipping files does not count as a failure.Kelly Yancey2000-08-022-2/+1
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=64120
* Clean up some $Log$ debris, including some real messes.Peter Wemm1999-09-0512-322/+0
| | | | Notes: svn path=/head/; revision=50965
* $Header$ -> $FreeBSD$Peter Wemm1999-08-2812-12/+53
| | | | Notes: svn path=/head/; revision=50488
* Add PATCH_INDEX_FIRST environment variable to do the same as -I optionAndrey A. Chernov1998-01-222-4/+17
| | | | Notes: svn path=/head/; revision=32698
* Update usage line with new optionAndrey A. Chernov1998-01-211-2/+6
| | | | Notes: svn path=/head/; revision=32674
* Add -I or --index-first option to take Index: precedence over context diff,Andrey A. Chernov1998-01-213-5/+32
| | | | | | | as it was in hacked FreeBSD version Notes: svn path=/head/; revision=32673
* Resurrect patch 2.1 without FreeBSD Index: hackAndrey A. Chernov1998-01-2121-125/+5871
| | | | Notes: svn path=/head/; revision=32672
* Upgrade to 2.5 (contrib version)Andrey A. Chernov1998-01-0421-5808/+125
| | | | Notes: svn path=/head/; revision=32252
* Back out Index over +++/--- precedence.Andrey A. Chernov1998-01-031-5/+10
| | | | | | | | | | It maybe right, if patch was FreeBSD-own program, but it break compatibility with pre-existent patches in other systems. The example is big ncurses patch which don't apply on FreeBSD due to "fixed" precedence. Notes: svn path=/head/; revision=32224
* Add (unsigned char) cast to ctype macrosAndrey A. Chernov1997-10-234-38/+82
| | | | Notes: svn path=/head/; revision=30661
* fix compilation warnings in patch... (with slight modification)John-Mark Gurney1997-03-175-6/+34
| | | | | | | | | | | also remove -Wall that I acidentally committed last time I was here... Submitted-by: Philippe Charnier Closes PR#2998 Notes: svn path=/head/; revision=23955
* Fix a problem with patch in that is will always default, even when theJohn-Mark Gurney1997-02-136-16/+37
| | | | | | | | | | | | | | | | controlling terminal is closed. Now the function ask() will return 1 when th input is known to come from a file or terminal, or it will return 0 when ther was a read error. Modified the question "Skip patch?" so that on an error from ask it will skip the patch instead of looping. Closes PR#777 2.2 candidate Notes: svn path=/head/; revision=22674
* Attempt to break a $Log$ snafu where a *** /--- (minus space)Mark Murray1996-04-121-1/+16
| | | | | | | was fouling up a comment in the checked-out code. Notes: svn path=/head/; revision=15214
* Priorities were broken. If there was an Index: line and ***/--- linesMark Murray1996-04-111-4/+11
| | | | | | | | | | | | | | | | | | with valid names, the ***/---names were taken first. this broke eg: Index: foo/Makefile ========== RCS <blah> Retrieving <blah> diff <blah> *** Makefile <blah> --- Makefile <blah> By trying to patch the Makefile in the _curent_ directory, rather than the one in the foo/ directory. Notes: svn path=/head/; revision=15195
* Update the manual page to reflect the fact that an "Index" lineJohn Polstra1996-02-071-2/+5
| | | | | | | | now takes precedence over a context diff header for determining the name of the file to patch. Notes: svn path=/head/; revision=13960
* Give "Index" specified filenames preference over other filenames specifiedJustin T. Gibbs1995-09-141-3/+6
| | | | | | | | | | in the diff. This makes it so that diffs containing files in different subdirectories that have the same name not patch the same file. For example a diff with patches to Makefile, des/Makefile, usr.bin/Makefile would attempt to patch Makefile three times. Notes: svn path=/head/; revision=10723
* Remove trailing whitespace.Rodney W. Grimes1995-05-3015-97/+133
| | | | Notes: svn path=/head/; revision=8858
* Fix bug that created new files even when running in -C check mode.Jeffrey Hsu1995-01-122-4/+16
| | | | | | | Reviewed by: phk Notes: svn path=/head/; revision=5556
* added the -C/-check again.Poul-Henning Kamp1994-02-253-8/+35
| | | | Notes: svn path=/head/; revision=1212
* Put this back - I was somehow under the erroneous impression that patch was inJordan K. Hubbard1994-02-173-23/+20
| | | | | | | ports, until I saw the the commit messages, that is! :-) All changed backed out. Notes: svn path=/head/; revision=1174
* From Poul-Henning Kamp - Implement a -C option to verify the integrity ofJordan K. Hubbard1994-02-173-11/+35
| | | | | | | a patch before actually applying it. Notes: svn path=/head/; revision=1173
* Increaed the fixed static buffer sizes and maximum hunk size thatRich Murphey1993-09-221-5/+8
| | | | | | | otherwise causes the XFree86 1.3 patch set to fail. Notes: svn path=/head/; revision=497
* b-maked patch-2.10Paul Richards1993-06-1921-0/+5600
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=33