mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-22 08:53:41 +01:00
Add PATCH_INDEX_FIRST environment variable to do the same as -I option
This commit is contained in:
parent
5aeee887af
commit
2aee32e1f8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32698
@ -1,8 +1,12 @@
|
||||
.\" -*- nroff -*-
|
||||
.rn '' }`
|
||||
'\" $Header: /home/ncvs/src/gnu/usr.bin/patch/patch.1,v 1.7 1998/01/21 14:37:21 ache Exp $
|
||||
'\" $Header: /home/ncvs/src/gnu/usr.bin/patch/patch.1,v 1.8 1998/01/21 15:10:13 ache Exp $
|
||||
'\"
|
||||
'\" $Log: patch.1,v $
|
||||
'\" Revision 1.8 1998/01/21 15:10:13 ache
|
||||
'\" Add -I or --index-first option to take Index: precedence over context diff,
|
||||
'\" as it was in hacked FreeBSD version
|
||||
'\"
|
||||
'\" Revision 1.7 1998/01/21 14:37:21 ache
|
||||
'\" Resurrect patch 2.1 without FreeBSD Index: hack
|
||||
'\"
|
||||
@ -342,6 +346,9 @@ the number of lines of context in the context diff, ordinarily 3.
|
||||
forces
|
||||
.I patch
|
||||
to take ``Index:'' line precedence over context diff header.
|
||||
The same effect have
|
||||
.B PATCH_INDEX_FIRST
|
||||
environment variable if present.
|
||||
.TP 5
|
||||
.B "\-l, \-\-ignore\-whitespace"
|
||||
causes the pattern matching to be done loosely, in case the tabs and
|
||||
|
@ -1,5 +1,5 @@
|
||||
char rcsid[] =
|
||||
"$Header: /home/ncvs/src/gnu/usr.bin/patch/patch.c,v 1.12 1998/01/21 15:10:13 ache Exp $";
|
||||
"$Header: /home/ncvs/src/gnu/usr.bin/patch/patch.c,v 1.13 1998/01/21 15:15:39 ache Exp $";
|
||||
|
||||
/* patch - a program to apply diffs to original files
|
||||
*
|
||||
@ -9,6 +9,9 @@ char rcsid[] =
|
||||
* money off of it, or pretend that you wrote it.
|
||||
*
|
||||
* $Log: patch.c,v $
|
||||
* Revision 1.13 1998/01/21 15:15:39 ache
|
||||
* Update usage line with new option
|
||||
*
|
||||
* Revision 1.12 1998/01/21 15:10:13 ache
|
||||
* Add -I or --index-first option to take Index: precedence over context diff,
|
||||
* as it was in hacked FreeBSD version
|
||||
@ -179,8 +182,9 @@ static int reverse_flag_specified = FALSE;
|
||||
/* TRUE if -C was specified on command line. */
|
||||
int check_patch = FALSE;
|
||||
|
||||
/* TRUE if -I was specified on command line. */
|
||||
int index_first = FALSE;
|
||||
/* TRUE if -I was specified on command line */
|
||||
/* or PATCH_INDEX_FIRST env. variable is set */
|
||||
int index_first;
|
||||
|
||||
/* Apply a set of diffs as appropriate. */
|
||||
|
||||
@ -205,6 +209,8 @@ char **argv;
|
||||
|
||||
myuid = getuid();
|
||||
|
||||
index_first = getenv ("PATCH_INDEX_FIRST") != 0;
|
||||
|
||||
/* Cons up the names of the temporary files. */
|
||||
{
|
||||
/* Directory for temporary files. */
|
||||
|
Loading…
Reference in New Issue
Block a user