| 268 | } |
| 269 | |
| 270 | int |
| 271 | main(int argc, char *argv[]) |
| 272 | { |
| 273 | poptContext pc; |
| 274 | const char **extra_args; |
| 275 | int opt; |
| 276 | |
| 277 | pc = poptGetContext(PROGRAM, argc, (const char **)argv, long_options, 0); |
| 278 | while ((opt = poptGetNextOpt(pc)) != -1) { |
| 279 | switch (opt) { |
| 280 | case 'h': |
| 281 | tls_usage(0); |
| 282 | default: |
| 283 | fprintf(stderr, "%s: %s\n", |
| 284 | poptBadOption(pc, POPT_BADOPTION_NOALIAS), |
| 285 | poptStrerror(opt)); |
| 286 | tls_usage(1); |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | extra_args = poptGetArgs(pc); |
| 291 | if (!extra_args || *extra_args == NULL) |
| 292 | tls_usage(1); |
| 293 | |
| 294 | for (; *extra_args; extra_args++) |
| 295 | list_file(*extra_args); |
| 296 | poptFreeContext(pc); |
| 297 | |
| 298 | return 0; |
| 299 | } |
nothing calls this directly
no test coverage detected