Commit cb130fe1 cb130fe109a0e812a836d1847c32b8daaf76e134 by Sergey Poznyakoff

Remove leftover optind usage. Thanks Jay Sulzberger <jays@panix.com> for reporting.

1 parent db64efbb
...@@ -147,6 +147,7 @@ int ...@@ -147,6 +147,7 @@ int
147 main (int argc, char *argv[]) 147 main (int argc, char *argv[])
148 { 148 {
149 int c = argc; 149 int c = argc;
150 int index;
150 mu_guimb_param_t param; 151 mu_guimb_param_t param;
151 struct guimb_data gd; 152 struct guimb_data gd;
152 153
...@@ -155,7 +156,7 @@ main (int argc, char *argv[]) ...@@ -155,7 +156,7 @@ main (int argc, char *argv[])
155 156
156 append_arg (""); 157 append_arg ("");
157 mu_argp_init (program_version, NULL); 158 mu_argp_init (program_version, NULL);
158 mu_argp_parse (&argp, &argc, &argv, 0, guimb_argp_capa, NULL, &c); 159 mu_argp_parse (&argp, &argc, &argv, 0, guimb_argp_capa, &index, &c);
159 160
160 for (; c < argc; c++) 161 for (; c < argc; c++)
161 append_arg (argv[c]); 162 append_arg (argv[c]);
...@@ -174,7 +175,7 @@ main (int argc, char *argv[]) ...@@ -174,7 +175,7 @@ main (int argc, char *argv[])
174 /* Register the desired formats. */ 175 /* Register the desired formats. */
175 mu_register_all_formats (); 176 mu_register_all_formats ();
176 177
177 if (!argv[optind]) 178 if (!argv[index])
178 { 179 {
179 if (default_mailbox) 180 if (default_mailbox)
180 append_arg (default_mailbox); 181 append_arg (default_mailbox);
...@@ -184,12 +185,12 @@ main (int argc, char *argv[]) ...@@ -184,12 +185,12 @@ main (int argc, char *argv[])
184 { 185 {
185 collect_open_mailbox_file (); 186 collect_open_mailbox_file ();
186 187
187 if (argv[optind]) 188 if (argv[index])
188 { 189 {
189 for (; argv[optind]; optind++) 190 for (; argv[index]; index++)
190 { 191 {
191 append_arg (argv[optind]); 192 append_arg (argv[index]);
192 collect_append_file (argv[optind]); 193 collect_append_file (argv[index]);
193 } 194 }
194 } 195 }
195 else 196 else
......