| 377 | */ |
| 378 | |
| 379 | int /* O - Exit status */ |
| 380 | main(int argc, /* I - Number of command-line args */ |
| 381 | char *argv[]) /* I - Command-line arguments */ |
| 382 | { |
| 383 | int i; /* Looping var */ |
| 384 | const char *opt, /* Current option character */ |
| 385 | *attrfile = NULL, /* ippserver attributes file */ |
| 386 | *command = NULL, /* Command to run with job files */ |
| 387 | *device_uri = NULL, /* Device URI */ |
| 388 | *output_format = NULL, /* Output format */ |
| 389 | *icon = NULL, /* Icon file */ |
| 390 | #ifdef HAVE_TLS |
| 391 | *keypath = NULL, /* Keychain path */ |
| 392 | #endif /* HAVE_TLS */ |
| 393 | *location = "", /* Location of printer */ |
| 394 | *make = "Example", /* Manufacturer */ |
| 395 | *model = "Printer", /* Model */ |
| 396 | *name = NULL, /* Printer name */ |
| 397 | #if !CUPS_LITE |
| 398 | *ppdfile = NULL, /* PPD file */ |
| 399 | #endif /* !CUPS_LITE */ |
| 400 | *strings = NULL, /* Strings file */ |
| 401 | *subtypes = "_print"; /* DNS-SD service subtype */ |
| 402 | int legacy = 0, /* Legacy mode? */ |
| 403 | duplex = 0, /* Duplex mode */ |
| 404 | ppm = 10, /* Pages per minute for mono */ |
| 405 | ppm_color = 0, /* Pages per minute for color */ |
| 406 | web_forms = 1; /* Enable website forms? */ |
| 407 | ipp_t *attrs = NULL; /* Printer attributes */ |
| 408 | char directory[1024] = ""; /* Spool directory */ |
| 409 | cups_array_t *docformats = NULL; /* Supported formats */ |
| 410 | const char *servername = NULL; /* Server host name */ |
| 411 | int serverport = 0; /* Server port number (0 = auto) */ |
| 412 | ippeve_printer_t *printer; /* Printer object */ |
| 413 | |
| 414 | |
| 415 | /* |
| 416 | * Parse command-line arguments... |
| 417 | */ |
| 418 | |
| 419 | for (i = 1; i < argc; i ++) |
| 420 | { |
| 421 | if (!strcmp(argv[i], "--help")) |
| 422 | { |
| 423 | usage(0); |
| 424 | } |
| 425 | else if (!strcmp(argv[i], "--no-web-forms")) |
| 426 | { |
| 427 | web_forms = 0; |
| 428 | } |
| 429 | else if (!strcmp(argv[i], "--pam-service")) |
| 430 | { |
| 431 | i ++; |
| 432 | if (i >= argc) |
| 433 | usage(1); |
| 434 | |
| 435 | PAMService = argv[i]; |
| 436 | } |
nothing calls this directly
no test coverage detected