summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* umask juggling not needed; with Lionel Fourquaux.otto2005-06-203-14/+8
| | | | ok millert@ espie@
* Do not call out mkdir -p, but reuse the code from mkdir(1).espie2005-05-164-12/+91
| | | | | | | | | | | Removes the possibility of nasty stuff happening thanks to unquoted arguments in system(1). Also plug a small memory leak. Problems noticed by Lionel Fourquaud. okay millert@, deraadt@
* Write reject file in unified format if the original diff was inotto2004-11-191-4/+84
| | | | | unified format. ok deraadt@
* Allow for path names containing spaces and other funny chars (exceptotto2004-11-191-4/+6
| | | | | | | | tab) by scanning for the tab that separates the date from the pathname. If no tab is found, revert back to the old behaviour. Posix says there should be a space between the pathname and the date, but all known implementations of diff(1) use a tab. ok kurt@ deraadt@
* remove unused variablederaadt2004-09-141-4/+3
|
* spacingderaadt2004-08-055-21/+21
|
* Properly detect if a patch already has been applied, even if thereotto2004-07-092-4/+25
| | | | | | are no eols at eofs involved. Tested by quite some people. ok deraadt@
* Unbreak handling of standard diffs (which have an empty context).otto2004-06-181-4/+9
| | | | ok @millert
* Teach patch(1) to detect if a diff creating a file (or one addingotto2004-06-141-5/+5
| | | | | lines to an empty file) already has been applied; be a bit less chatty about empty contexts. Testing hshoexer@ ok millert@
* Fix a segv when patch cannot find a file and the user indicatesotto2004-01-281-3/+3
| | | | | | to use the file anyway. Problem found by david@ ok david@ millert@
* MAP_FILE is the default and MAP_PRIVATE has to be given or produces evil warnings in debug kernelmickey2003-12-081-3/+3
|
* madvise(sequential) the mmap()ed file and plug an fd leak on mmap() failure; millert@ okmickey2003-11-211-2/+5
|
* o fairly major man page reorganizationmillert2003-10-317-256/+495
| | | | | | 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@
* realloc(3) cleanup.otto2003-09-282-12/+35
| | | | ok cloder@ tedu@
* Add license from patch.c to original source files missing a license.otto2003-08-157-10/+192
| | | | ok deraadt@
* Fix no newline at end of file case for Plan B.otto2003-08-121-7/+16
| | | | ok millert@ tedu@
* Do not add an extra newline at the end if the last line of the inputotto2003-08-103-19/+31
| | | | | | | 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 contextotto2003-08-101-3/+10
| | | | | | is empty. In this case, a previously applied patch cannot be detected. ok millert@ tedu@
* Avoid scanning the input file twice.otto2003-08-081-21/+35
| | | | ok millert@ tedu@
* spacingderaadt2003-08-052-16/+16
|
* - Use mmap(2) instead of malloc(3) and read(2) to get an image of the inputotto2003-08-051-27/+61
| | | | | | | file into memory. Some suggestions by tedu@. - Add a debug option to force using Plan B. ok millert@ deraadt@
* - use stdbool.h instead of roll-your-own booleansotto2003-08-016-181/+184
| | | | | | | | | - 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 contradictsmillert2003-07-312-9/+7
| | | | | 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").
* Unbreak relative directory handling. Tweak from millert@otto2003-07-311-4/+5
| | | | ok millert@
* Print a maximum of one invalid line number warning per patch in a patch file.otto2003-07-313-6/+12
| | | | | | Thanks to espie@ for spotting the problem. ok millert@ henning@ espie@
* Add POSIX -i option; tedu@ OKmillert2003-07-302-10/+24
|
* Make prompting POSIX-compliant. POSIX states "The patch utilitymillert2003-07-301-34/+18
| | | | | | shall write a prompt to standard output and request a filename interactively from the controlling terminal (for example, /dev/tty)." OK deraadt@ and otto@
* o add pathnames.hmillert2003-07-294-32/+47
| | | | | | o ignore empty TMPDIR environment variable o strip any trailing slashes from TMPDIR otto@ OK
* minor knf and cleanups; otto okderaadt2003-07-284-28/+25
|
* Don't treat consecutive slashes as path components; matches POSIXmillert2003-07-281-7/+7
| | | | OK otto@ and deraadt@
* More cleanup: sprinkled some const, removed ugly EXTERN/INTERN.h,otto2003-07-2811-233/+157
| | | | | | some rewriting of code to make it more readable and more KNF. ok millert@ tedu@ deraadt@
* Be more exact on how backup files are handled.otto2003-07-281-3/+3
| | | | ok millert@ tedu@
* Be more exact on how backup files are handled.otto2003-07-281-59/+114
| | | | ok millert@ tedu@
* Make patch(1) exit value match POSIX and be consistent with diff.millert2003-07-284-20/+29
| | | | Comments and OK from otto@
* Add POSIX -b option but don't change the default beahvior wrt backupsmillert2003-07-255-111/+121
| | | | yet. The old -b option is now -z (matches GNU patch).
* "options" not "switches"; jmc@ OKmillert2003-07-241-13/+12
| | | | also update Larry's email address while I am at it ;-)
* Don't talk about ~ and # suffixes for orig and reject files since wemillert2003-07-241-19/+5
| | | | use .orig and .rej.
* mdoc version;jmc2003-07-241-316/+325
| | | | ok millert@
* New version of invalid line number fix. Passes patch(1) regressions.otto2003-07-232-10/+19
| | | | ok millert@ deraadt@
* Missed this in the rejname commit.millert2003-07-221-2/+1
|
* Make rejname[] static to patch.c and crank its size to NAME_MAX+1millert2003-07-221-3/+8
|
* Use getopt_long() to parse options instead of rolling our own.millert2003-07-222-222/+143
| | | | OK deraadt@ and otto@
* just about nothingderaadt2003-07-224-13/+13
|
* nicerderaadt2003-07-221-4/+4
|
* POSIX defines allowed commands as {a,c,d,i,s} but patch was onlymillert2003-07-221-6/+5
| | | | | recognizing {a,c,d}. We need to recognize 's' (substitute) for the "dot alone on a line" bug fix in diff(1).
* More cleanup.otto2003-07-2210-325/+296
| | | | ok millert@ tedu@
* Back out invalid line number fix. It core dumps in some cases. Problem found byotto2003-07-212-11/+6
| | | | | marc@. ok henning@
* fix headerderaadt2003-07-2113-18/+19
|
* remove a bit more junkderaadt2003-07-214-41/+20
|
* knfderaadt2003-07-211-8/+14
|