(parse_opt): Bugfix. Was using optarg instead of arg
Showing
4 changed files
with
20 additions
and
20 deletions
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | 1 | /* GNU Mailutils -- a suite of utilities for electronic mail |
2 | Copyright (C) 1999, 2000, 2001, 2002, 2003, | 2 | Copyright (C) 1999, 2000, 2001, 2002, 2003, |
3 | 2004 Free Software Foundation, Inc. | 3 | 2004, 2005 Free Software Foundation, Inc. |
4 | 4 | ||
5 | GNU Mailutils is free software; you can redistribute it and/or modify | 5 | GNU Mailutils is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
... | @@ -227,7 +227,7 @@ parse_opt (int key, char *arg, struct argp_state *state) | ... | @@ -227,7 +227,7 @@ parse_opt (int key, char *arg, struct argp_state *state) |
227 | break; | 227 | break; |
228 | 228 | ||
229 | case 's': | 229 | case 's': |
230 | select_attribute = decode_attr (optarg); | 230 | select_attribute = decode_attr (arg); |
231 | break; | 231 | break; |
232 | 232 | ||
233 | case 't': | 233 | case 't': | ... | ... |
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | 1 | /* GNU Mailutils -- a suite of utilities for electronic mail |
2 | Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. | 2 | Copyright (C) 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc. |
3 | 3 | ||
4 | GNU Mailutils is free software; you can redistribute it and/or modify | 4 | GNU Mailutils is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
... | @@ -166,20 +166,20 @@ parse_opt (int key, char *arg, struct argp_state *state) | ... | @@ -166,20 +166,20 @@ parse_opt (int key, char *arg, struct argp_state *state) |
166 | 166 | ||
167 | #ifdef WITH_GUILE | 167 | #ifdef WITH_GUILE |
168 | case 's': | 168 | case 's': |
169 | progfile_pattern = optarg; | 169 | progfile_pattern = arg; |
170 | break; | 170 | break; |
171 | #endif | 171 | #endif |
172 | 172 | ||
173 | case 'S': | 173 | case 'S': |
174 | sieve_pattern = optarg; | 174 | sieve_pattern = arg; |
175 | break; | 175 | break; |
176 | 176 | ||
177 | case 'x': | 177 | case 'x': |
178 | do | 178 | do |
179 | { | 179 | { |
180 | if (!optarg) | 180 | if (!arg) |
181 | optarg = D_DEFAULT; | 181 | arg = D_DEFAULT; |
182 | switch (*optarg) | 182 | switch (*arg) |
183 | { | 183 | { |
184 | case 'g': | 184 | case 'g': |
185 | #ifdef WITH_GUILE | 185 | #ifdef WITH_GUILE |
... | @@ -208,14 +208,14 @@ parse_opt (int key, char *arg, struct argp_state *state) | ... | @@ -208,14 +208,14 @@ parse_opt (int key, char *arg, struct argp_state *state) |
208 | break; | 208 | break; |
209 | 209 | ||
210 | default: | 210 | default: |
211 | if (isdigit (*optarg)) | 211 | if (isdigit (*arg)) |
212 | debug_level = *optarg - '0'; | 212 | debug_level = *arg - '0'; |
213 | else | 213 | else |
214 | argp_error (state, _("%c is not a valid debug flag"), *arg); | 214 | argp_error (state, _("%c is not a valid debug flag"), *arg); |
215 | break; | 215 | break; |
216 | } | 216 | } |
217 | } | 217 | } |
218 | while (*++optarg); | 218 | while (*++arg); |
219 | break; | 219 | break; |
220 | 220 | ||
221 | default: | 221 | default: | ... | ... |
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | 1 | /* GNU Mailutils -- a suite of utilities for electronic mail |
2 | Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. | 2 | Copyright (C) 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc. |
3 | 3 | ||
4 | GNU Mailutils is free software; you can redistribute it and/or modify | 4 | GNU Mailutils is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
... | @@ -151,7 +151,7 @@ popauth_parse_opt (int key, char *arg, struct argp_state *astate) | ... | @@ -151,7 +151,7 @@ popauth_parse_opt (int key, char *arg, struct argp_state *astate) |
151 | break; | 151 | break; |
152 | 152 | ||
153 | case 'p': | 153 | case 'p': |
154 | ap->passwd = optarg; | 154 | ap->passwd = arg; |
155 | break; | 155 | break; |
156 | 156 | ||
157 | case 'm': | 157 | case 'm': |
... | @@ -160,19 +160,19 @@ popauth_parse_opt (int key, char *arg, struct argp_state *astate) | ... | @@ -160,19 +160,19 @@ popauth_parse_opt (int key, char *arg, struct argp_state *astate) |
160 | break; | 160 | break; |
161 | 161 | ||
162 | case 'f': | 162 | case 'f': |
163 | ap->input_name = optarg; | 163 | ap->input_name = arg; |
164 | break; | 164 | break; |
165 | 165 | ||
166 | case 'o': | 166 | case 'o': |
167 | ap->output_name = optarg; | 167 | ap->output_name = arg; |
168 | break; | 168 | break; |
169 | 169 | ||
170 | case 'u': | 170 | case 'u': |
171 | ap->username = optarg; | 171 | ap->username = arg; |
172 | break; | 172 | break; |
173 | 173 | ||
174 | case 'P': | 174 | case 'P': |
175 | set_db_perms (astate, optarg, &permissions); | 175 | set_db_perms (astate, arg, &permissions); |
176 | break; | 176 | break; |
177 | 177 | ||
178 | case ARGP_KEY_FINI: | 178 | case ARGP_KEY_FINI: | ... | ... |
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | 1 | /* GNU Mailutils -- a suite of utilities for electronic mail |
2 | Copyright (C) 1999, 2000, 2001, 2002, 2003, | 2 | Copyright (C) 1999, 2000, 2001, 2002, 2003, |
3 | 2004 Free Software Foundation, Inc. | 3 | 2004, 2005 Free Software Foundation, Inc. |
4 | 4 | ||
5 | GNU Mailutils is free software; you can redistribute it and/or modify | 5 | GNU Mailutils is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
... | @@ -88,11 +88,11 @@ readmsg_parse_opt (int key, char *arg, struct argp_state *astate) | ... | @@ -88,11 +88,11 @@ readmsg_parse_opt (int key, char *arg, struct argp_state *astate) |
88 | break; | 88 | break; |
89 | 89 | ||
90 | case 'f': | 90 | case 'f': |
91 | mailbox_name = optarg; | 91 | mailbox_name = arg; |
92 | break; | 92 | break; |
93 | 93 | ||
94 | case 'w': | 94 | case 'w': |
95 | weedlist = optarg; | 95 | weedlist = arg; |
96 | break; | 96 | break; |
97 | 97 | ||
98 | case 'n': | 98 | case 'n': | ... | ... |
-
Please register or sign in to post a comment