Debian Codegraph @

src/testpattern/printers.c

raw symbols SCIP
1 /*
2 *
3 * Dump the per-printer options for the OpenPrinting database
4 *
5 * Copyright 2000 Robert Krawitz ([email protected])
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the Free
9 * Software Foundation; either version 2 of the License, or (at your option)
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21 #ifdef HAVE_CONFIG_H
22 #include <config.h>
23 #endif
24 #include <stdio.h>
25 #include <gutenprint/gutenprint.h>
26 #include <string.h>
27
28 int
29 main(int argc, char **argv)
30 {
31 int i;
32 (void)argc;
33 (void)argv;
34
35 stp_init();
36 for (i = 0; i < stp_printer_model_count(); i++)
37 {
38 const stp_printer_t *p = stp_get_printer_by_index(i);
39 if (strcmp(stp_printer_get_family(p), "ps") &&
40 strcmp(stp_printer_get_family(p), "raw"))
41 printf("%d %s %s\n", stp_printer_get_model(p),
42 stp_printer_get_family(p), stp_printer_get_driver(p));
43 }
44 return 0;
45 }