Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | The function savestr allows NULL return values during Plan A patching so in | 2014-12-13 | 1 | -8/+8 | |
| | | | | | | case of out of memory conditions, Plan B can step in. In many cases, NULL value is not properly handled, so use xstrdup here (it's outside Plan A/B patching, which means that even Plan B relies on successful operations). | ||||
* | spaces | 2014-12-08 | 1 | -3/+3 | |
| | |||||
* | Prefer setvbuf() to setlinebuf() for portability; ok deraadt@ | 2014-11-26 | 1 | -3/+3 | |
| | |||||
* | unsigned char casts for ctype | 2013-11-26 | 1 | -7/+7 | |
| | | | | ok krw | ||||
* | Fix confusing patch(1) output on failure when using -C. From | 2012-05-15 | 1 | -8/+7 | |
| | | | | dragonflybsd via Loganaden Velvindron. OK mikeb@ and deraadt@ | ||||
* | Send normal output to stdout instead of everything to stderr. This | 2010-07-24 | 1 | -5/+3 | |
| | | | | | | | | | | is currently done in the latest versions of GNU patch. Please watch out for output appearing out-of-order. Discussed with millert and deraadt. OK deraadt | ||||
* | rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and | 2009-10-27 | 1 | -5/+1 | |
| | | | | | | | 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 | ||||
* | If no patch can be found in input, in addition to complaining on stderr, | 2009-04-05 | 1 | -2/+10 | |
| | | | | | | | | have the exit code indicate failure, not success. Discrepancy with GNU patch pointed out by Arfrever Frehtes Taifersar Arahesis. Help from and ok djm@, "sounds good to me" millert@ | ||||
* | The code to detect multiple applied diffs to empty files I introduced 4 | 2008-08-20 | 1 | -9/+3 | |
| | | | | | | years ago is not correct if the diff has an empty context for other reasons, so revert that change. Problem found by Joerg Sonnenberger; ok tedu@ millert@ | ||||
* | adds a detailed synopsis to the man page; sorts options in | 2007-04-18 | 1 | -5/+6 | |
| | | | | | | | | the description list and adds missing arguments; syncs usage() written with a lot of useful advice by jmc@ ok by jmc@ | ||||
* | type police and assorted cleanup. From Lionel Fourquaux; ok ray@ | 2006-03-11 | 1 | -3/+3 | |
| | |||||
* | Write reject file in unified format if the original diff was in | 2004-11-19 | 1 | -4/+84 | |
| | | | | | unified format. ok deraadt@ | ||||
* | remove unused variable | 2004-09-14 | 1 | -4/+3 | |
| | |||||
* | Properly detect if a patch already has been applied, even if there | 2004-07-09 | 1 | -2/+17 | |
| | | | | | | are no eols at eofs involved. Tested by quite some people. ok deraadt@ | ||||
* | Unbreak handling of standard diffs (which have an empty context). | 2004-06-18 | 1 | -4/+9 | |
| | | | | ok @millert | ||||
* | Teach patch(1) to detect if a diff creating a file (or one adding | 2004-06-14 | 1 | -5/+5 | |
| | | | | | lines to an empty file) already has been applied; be a bit less chatty about empty contexts. Testing hshoexer@ ok millert@ | ||||
* | o fairly major man page reorganization | 2003-10-31 | 1 | -9/+12 | |
| | | | | | | o add --posix option for strict POSIX conformance o change filename determination to match GNU patch Tested by various people, including a full ports build by naddy@ | ||||
* | Do not add an extra newline at the end if the last line of the input | 2003-08-10 | 1 | -15/+24 | |
| | | | | | | | file contains no newline and the diff does not touch the last line. Contributions from millert@. ok millert@ tedu@ | ||||
* | Warn if the diff is a context or unified diff and the context | 2003-08-10 | 1 | -3/+10 | |
| | | | | | | is empty. In this case, a previously applied patch cannot be detected. ok millert@ tedu@ | ||||
* | - use stdbool.h instead of roll-your-own booleans | 2003-08-01 | 1 | -59/+58 | |
| | | | | | | | | | - fix some -Wall warnings - fix asserts: in some cases remove them, in other cases they have become Internal errors or detection of malformed patch files. - fix some free() related code ok millert@ tedu@ | ||||
* | Historically, patch would treat a bare -p as -p0. This contradicts | 2003-07-31 | 1 | -6/+6 | |
| | | | | | POSIX and GNU patch has also removed this, so we will too. No objections on icb (no one even seemed to know about this "feature"). | ||||
* | Print a maximum of one invalid line number warning per patch in a patch file. | 2003-07-31 | 1 | -2/+4 | |
| | | | | | | Thanks to espie@ for spotting the problem. ok millert@ henning@ espie@ | ||||
* | Add POSIX -i option; tedu@ OK | 2003-07-30 | 1 | -9/+19 | |
| | |||||
* | o add pathnames.h | 2003-07-29 | 1 | -20/+23 | |
| | | | | | | o ignore empty TMPDIR environment variable o strip any trailing slashes from TMPDIR otto@ OK | ||||
* | minor knf and cleanups; otto ok | 2003-07-28 | 1 | -8/+8 | |
| | |||||
* | Be more exact on how backup files are handled. | 2003-07-28 | 1 | -59/+114 | |
| | | | | ok millert@ tedu@ | ||||
* | Make patch(1) exit value match POSIX and be consistent with diff. | 2003-07-28 | 1 | -9/+7 | |
| | | | | Comments and OK from otto@ | ||||
* | Add POSIX -b option but don't change the default beahvior wrt backups | 2003-07-25 | 1 | -10/+28 | |
| | | | | yet. The old -b option is now -z (matches GNU patch). | ||||
* | New version of invalid line number fix. Passes patch(1) regressions. | 2003-07-23 | 1 | -7/+16 | |
| | | | | ok millert@ deraadt@ | ||||
* | Make rejname[] static to patch.c and crank its size to NAME_MAX+1 | 2003-07-22 | 1 | -3/+8 | |
| | |||||
* | Use getopt_long() to parse options instead of rolling our own. | 2003-07-22 | 1 | -204/+141 | |
| | | | | OK deraadt@ and otto@ | ||||
* | More cleanup. | 2003-07-22 | 1 | -73/+66 | |
| | | | | ok millert@ tedu@ | ||||
* | Back out invalid line number fix. It core dumps in some cases. Problem found by | 2003-07-21 | 1 | -8/+3 | |
| | | | | | marc@. ok henning@ | ||||
* | fix header | 2003-07-21 | 1 | -2/+2 | |
| | |||||
* | knf and other cleanup; ok otto | 2003-07-21 | 1 | -781/+747 | |
| | |||||
* | remove junk; ok otto tedu | 2003-07-18 | 1 | -144/+126 | |
| | |||||
* | Do not produce garbage if the patch file contains invalid line numbers. | 2003-07-16 | 1 | -3/+8 | |
| | | | | ok millert@ tedu@ | ||||
* | bump randomness of mktemp to from 6 to 10 X's, as recommended by mktemp(3) | 2003-07-02 | 1 | -6/+6 | |
| | |||||
* | string fixes; ok miod henning | 2003-04-05 | 1 | -20/+6 | |
| | |||||
* | 4 unchecked mallocs; cloder@acm.org | 2002-07-04 | 1 | -2/+10 | |
| | |||||
* | patch(1) is now free, thanks Larry! | 2002-03-05 | 1 | -4/+19 | |
| | |||||
* | avoid overflows | 1999-12-04 | 1 | -5/+9 | |
| | |||||
* | patch file should hold at least one patch, otherwise we're entitled to | 1999-08-31 | 1 | -2/+6 | |
| | | | | a diagnostic. | ||||
* | add -C | 1998-11-25 | 1 | -17/+28 | |
| | |||||
* | Start of -Wall and cleaning up icky bits. | 1997-09-22 | 1 | -2/+7 | |
| | |||||
* | r?index -> strr?chr | 1997-01-17 | 1 | -3/+3 | |
| | |||||
* | sprintf -> snprintf except where guaranteed safe. | 1996-09-24 | 1 | -9/+9 | |
| | |||||
* | Use mkstemp(). Since temp files get re-used we use mkstemp() to make | 1996-09-24 | 1 | -6/+14 | |
| | | | | | us a "place holder" (and discard the fd) to protect from DOS attacks and then just re-use that. | ||||
* | undo last; mkstemp is *hard* to do in here | 1996-09-23 | 1 | -10/+6 | |
| | |||||
* | Be slightly safer opening temp files. | 1996-09-15 | 1 | -6/+10 | |
| |