summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch
AgeCommit message (Expand)AuthorFilesLines
2019-12-11Merge existing decls and decls introduced in rev 1.10jca1-11/+9
2019-12-09Move RCS Id to the top of the filejca1-1/+2
2019-12-02Tweak previous, using fputs here was finejca1-2/+2
2019-12-02Use getline(3) to handle lines longer than 8192 bytes in patch filesjca6-51/+62
2019-08-17signal handlers should not call exit() due to possibility of reenteringderaadt2-8/+25
2019-06-28When system calls indicate an error they return -1, not some arbitraryderaadt3-14/+14
2019-06-28mkstemp() returns -1 on failurederaadt1-5/+5
2018-12-30Delete unnecessary <libgen.h> #includesguenther1-2/+1
2018-06-22Add --dry-run as synonym to -C/--check.zhuk2-4/+5
2018-04-26Use <fcntl.h> instead of <sys/file.h> for open() and friends.guenther1-4/+2
2018-04-11Stop telling patch(1) runs ed(1).zhuk1-8/+2
2018-04-07Remove unused pathnames.h header since patch was refactoring into not invokinganton4-17/+4
2017-12-20Fix adding and removing files with git-style a/ b/ diffs: only skiptb1-3/+5
2017-06-12rejname[] is also -r option buffer, and should be PATH_MAXderaadt1-2/+2
2017-05-30Unbreak previous for git diffs that do not have the a/ prefix.florian1-2/+2
2017-05-26sometimes patches coming from other places have extra a/ and b/ directoriestedu1-7/+15
2017-03-26One string buffer can use recallocarray() to ensure that the address spacederaadt1-2/+2
2017-03-25parameter "lines_allocated" is a local pointer and should not be confusedderaadt1-5/+5
2016-09-02Fix 'c'hange command handling if last line of a file is removed.tobias1-2/+3
2016-09-02If reading fails, do not go into infinite loop asking for a filenameotto1-3/+5
2016-07-19Cleanup close(open idioms.deraadt1-2/+6
2016-02-22Properly handle ed-files which fully replace input file content. Thistobias1-18/+11
2016-01-04usage() should exit 2 here, not EXIT_SUCCESSgsoares1-2/+2
2015-12-29fix exit status on pledge(2) failure.gsoares1-2/+2
2015-11-11exit() after perror() for pledge failure. Perhaps this got introducedderaadt1-2/+4
2015-11-11creat() -> open equiv; from Frederic Nowakderaadt1-2/+2
2015-10-16Add native support for ed-style diffs. No need to pledge "proc exec" anymore.tobias6-96/+386
2015-10-09Change all tame callers to namechange to pledge(2).deraadt1-3/+3
2015-10-07patch(1) can move to "stdio rpath wpath cpath tmppath fattr proc exec"deraadt1-2/+2
2015-10-04remove tame "proc". it is not useful, because the "ed" diffs requirederaadt1-2/+2
2015-10-03As pointed out by tobiasu, ed-style patches still use popen() and executederaadt1-2/+2
2015-10-03patch appears to work fully with tame "stdio rpath wpath cpath tmppath fattr".deraadt1-1/+4
2015-07-31Account for newlines in substitution (s///) commands. Substitutionmillert1-2/+14
2015-07-26Remove support for automatically checking files out of RCS. Themillert6-133/+20
2015-03-13remove the first comma from constructs like ", and," and ", or,": you can usejmc1-3/+3
2015-02-05Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@millert2-3/+4
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt1-4/+3
2014-12-14Handle ed command "s" as a one line command, which it is.tobias1-3/+3
2014-12-13The function savestr allows NULL return values during Plan A patching so intobias4-17/+34
2014-12-09Fix division by zero for files with long lines (> 1024) in Plan B modetobias1-19/+37
2014-12-08spacesderaadt2-5/+5
2014-12-01three trivial reallocarray() usesderaadt1-4/+4
2014-11-26Prefer setvbuf() to setlinebuf() for portability; ok deraadt@millert1-3/+3
2014-11-26Properly validate line ranges supplied in diff file to prevent overflows.tobias1-4/+27
2014-11-25Introduce strtolinenum to properly check line numbers while parsing:tobias2-33/+51
2014-11-25Prevent null pointer dereference on empty input files when diff requirestobias1-2/+2
2014-11-22Remove SCCS support. For this to work, we would need "get", which we don'ttobias5-23/+12
2014-11-21Remove the README. It history from more than 20 years ago, and whilederaadt1-123/+0
2014-11-18Avoid iterating over end of string.tobias1-3/+3
2014-11-17Check fstat return value. Also, use off_t for file size and offsets astobias1-37/+39