203 |
|
|
204 |
boolean widthGiven = false; |
boolean widthGiven = false; |
205 |
boolean heightGiven = false; |
boolean heightGiven = false; |
206 |
|
boolean pluginMode = false; |
207 |
|
|
208 |
while ((optionValue = opts.getopt()) != -1) |
while ((optionValue = opts.getopt()) != -1) |
209 |
{ |
{ |
210 |
if (optionValue == 0) |
if (optionValue == 0) |
211 |
{ |
{ |
212 |
optionIndex = opts.getLongind(); |
optionIndex = opts.getLongind(); |
213 |
if (optionIndex == 0) |
|
214 |
|
if (optionIndex == 0) // --archive |
215 |
archives = opts.getOptarg(); |
archives = opts.getOptarg(); |
216 |
else if (optionIndex == 1) |
else if (optionIndex == 1) // --param |
217 |
{ |
{ |
218 |
if (parameters == null) |
if (parameters == null) |
219 |
parameters = new ArrayList (); |
parameters = new ArrayList (); |
220 |
parameters.add (opts.getOptarg()); |
parameters.add (opts.getOptarg()); |
221 |
} |
} |
222 |
else if (optionIndex == 2) |
else if (optionIndex == 2) // --width |
223 |
{ |
{ |
224 |
widthGiven = true; |
widthGiven = true; |
225 |
dimensions.width = |
dimensions.width = |
226 |
Math.max (0, Integer.parseInt(opts.getOptarg())); |
Math.max (0, Integer.parseInt(opts.getOptarg())); |
227 |
} |
} |
228 |
else if (optionIndex == 3) |
else if (optionIndex == 3) // --height |
229 |
{ |
{ |
230 |
heightGiven = true; |
heightGiven = true; |
231 |
dimensions.height = |
dimensions.height = |
232 |
Math.max (0, Integer.parseInt(opts.getOptarg())); |
Math.max (0, Integer.parseInt(opts.getOptarg())); |
233 |
} |
} |
234 |
// FIXME: Implement 4. |
else if (optionIndex == 4) // --plugin |
235 |
else if (optionIndex == 5) |
pluginMode = true; |
236 |
|
else if (optionIndex == 5) // --help |
237 |
printHelpMessage (0); |
printHelpMessage (0); |
238 |
} |
} |
239 |
} |
} |