jca
5fbd5e42b6
Use getline(3) to handle lines longer than 8192 bytes in patch files
...
Spotted by jsg@ when working on mesa. Diff tested by sthen@ in
a partial i386 bulk. Input from and ok jsg@ millert@
2019-12-02 22:17:32 +00:00
millert
7e39cfac2f
Remove support for automatically checking files out of RCS. The
...
behavior is confusing to users and even GNU patch no longer does
it by default. OK krw@ guenther@
2015-07-26 14:32:19 +00:00
tobias
031a04706e
Introduce strtolinenum to properly check line numbers while parsing:
...
no signs, no spaces, just digits, 0 <= x <= LONG_MAX
ok millert, otto
2014-11-25 10:26:07 +00:00
tobias
0529800e5c
Remove SCCS support. For this to work, we would need "get", which we don't
...
even have in ports. XSI functionality of POSIX, therefore optional.
ok deraadt, schwarze, tedu
2014-11-22 15:49:28 +00:00
otto
5e2529bcf9
type police and assorted cleanup. From Lionel Fourquaux; ok ray@
2006-03-11 19:41:30 +00:00
millert
53900eeeee
o fairly major man page reorganization
...
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@
2003-10-31 20:20:45 +00:00
otto
ddf7b806b7
Add license from patch.c to original source files missing a license.
...
ok deraadt@
2003-08-15 08:00:51 +00:00
otto
9f4ed7c2b1
Do not add an extra newline at the end if the last line of the input
...
file contains no newline and the diff does not touch the last line.
Contributions from millert@.
ok millert@ tedu@
2003-08-10 21:28:48 +00:00
otto
0e9f50d86f
- use stdbool.h instead of roll-your-own booleans
...
- 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@
2003-08-01 20:30:48 +00:00
otto
da07b79cbc
Print a maximum of one invalid line number warning per patch in a patch file.
...
Thanks to espie@ for spotting the problem.
ok millert@ henning@ espie@
2003-07-31 14:10:21 +00:00
deraadt
04e367a696
minor knf and cleanups; otto ok
2003-07-28 19:15:34 +00:00
otto
0326910242
More cleanup: sprinkled some const, removed ugly EXTERN/INTERN.h,
...
some rewriting of code to make it more readable and more KNF.
ok millert@ tedu@ deraadt@
2003-07-28 18:35:36 +00:00
millert
8d03510652
Missed this in the rejname commit.
2003-07-22 21:50:21 +00:00
otto
fb8601a0c8
More cleanup.
...
ok millert@ tedu@
2003-07-22 17:18:49 +00:00
deraadt
72e249842b
fix header
2003-07-21 14:32:21 +00:00
deraadt
1422fa04b6
remove a bit more junk
2003-07-21 14:30:31 +00:00
deraadt
be55ebd7ba
knf and other cleanup; ok otto
2003-07-21 14:00:41 +00:00
deraadt
5dc74f7d2e
remove junk; ok otto tedu
2003-07-18 02:00:09 +00:00
deraadt
c437d280db
oh, and the false protos can go
2003-04-08 01:54:56 +00:00
deraadt
c374abf0bf
Strcat and Strcpy are no longer used
2003-04-08 01:54:26 +00:00
millert
8b6f9cfe06
Use libc basename(3) and dirname(3) instead of defining our own. Also clean up some nasty assumptions that basename() returns a pointer that lies within its argument
1999-01-03 05:33:48 +00:00
millert
71eaa2b501
Start of -Wall and cleaning up icky bits.
1997-09-22 05:45:26 +00:00
niklas
26c743a2b3
I hate static buffer sizes! Prolongue the max length of a line to 8K
...
(from 1K which a patch in ports/print/ghostscript5 had a line longer than).
1997-09-06 23:51:31 +00:00
dgregor
6d4c2cc871
*** empty log message ***
1997-06-24 02:33:48 +00:00
millert
047169ab56
rindex -> strrchr
1997-01-17 15:47:51 +00:00
millert
7ecb9955a5
sprintf -> snprintf except where guaranteed safe.
1996-09-24 04:19:25 +00:00
millert
7ffd4e56ed
Use mkstemp(). Since temp files get re-used we use mkstemp() to make
...
us a "place holder" (and discard the fd) to protect from DOS attacks
and then just re-use that.
1996-09-24 02:58:52 +00:00
deraadt
b004f8f965
mktemp w/ open & fdopen
1996-06-25 23:06:36 +00:00
niklas
d438cbb613
Support the long options that FSF's patch version has. $OpenBSD$ added
1996-06-10 11:21:23 +00:00
deraadt
df930be708
initial import of NetBSD tree
1995-10-18 08:37:01 +00:00