aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/patch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/editors/patch.c b/editors/patch.c
index 580ee147c..ab3af3ce7 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -85,9 +85,11 @@ int patch_main(int argc UNUSED_PARAM, char **argv)
85 { 85 {
86 const char *p = "-1"; 86 const char *p = "-1";
87 const char *i = "-"; /* compat */ 87 const char *i = "-"; /* compat */
88 const char *g; /* unimplemented, default is "0" */
88#if ENABLE_LONG_OPTS 89#if ENABLE_LONG_OPTS
89 static const char patch_longopts[] ALIGN1 = 90 static const char patch_longopts[] ALIGN1 =
90 "strip\0" Required_argument "p" 91 "strip\0" Required_argument "p"
92 "get\0" Required_argument "g"
91 "input\0" Required_argument "i" 93 "input\0" Required_argument "i"
92 "reverse\0" No_argument "R" 94 "reverse\0" No_argument "R"
93 "forward\0" No_argument "N" 95 "forward\0" No_argument "N"
@@ -95,7 +97,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv)
95 ; 97 ;
96 applet_long_options = patch_longopts; 98 applet_long_options = patch_longopts;
97#endif 99#endif
98 opt = getopt32(argv, "p:i:RN", &p, &i); 100 opt = getopt32(argv, "p:i:RNg:", &p, &i, &g);
99 if (opt & OPT_R) 101 if (opt & OPT_R)
100 plus = '-'; 102 plus = '-';
101 patch_level = xatoi(p); /* can be negative! */ 103 patch_level = xatoi(p); /* can be negative! */