Debian Codegraph @

test/xml-curve.c

raw symbols SCIP
1 /*
2 *
3 * Copyright 2002 Robert Krawitz ([email protected])
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the Free
7 * Software Foundation; either version 2 of the License, or (at your option)
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19 #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:411:9`!
20 #include <config.h>cxx . . $ `<file>/config.h`/
21 #endif
22 #include <stdlib.h>
23 #include <stdio.h>
24 #include <unistd.h>
25 #include <string.h>
26 #include <gutenprint/gutenprint.h>cxx . . $ `<file>/include/gutenprint/gutenprint.h`/
27
28 int maincxx . . $ main(afcd3168fc1188a4).(int argc, char *argv[])
29 {
30 stp_curve_tcxx . . $ stp_curve_t# *curve;
31
32 if (argc != 2)
33 {
34 fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Usage: %s filename.xml\n", argv[0]);
35 return 1;
36 }
37
38 stp_initcxx . . $ stp_init(b126dc7c1de90089).();
39
40 #ifdef DEBUG
41 fprintf(stderr, "stp-xml-parse: reading `%s'...\n", argv[1]);
42 #endif
43
44 fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Using file: %s\n", argv[1]);
45 curve = stp_curve_create_from_filecxx . . $ stp_curve_create_from_file(fc1a54117bc5f637).(argv[1]);
46
47 if (curve)
48 {
49 char *output;
50 if ((stp_curve_writecxx . . $ stp_curve_write(963948d587b55a3d).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!, curve)) == 0)
51 fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "curve successfully created\n");
52 else
53 fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "error creating curve\n");
54 output = stp_curve_write_stringcxx . . $ stp_curve_write_string(757823e9e3a329cf).(curve);
55 if (output)
56 {
57 fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s", output);
58 fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "curve string successfully created\n");
59 freecxx . . $ free(5d22bdacc48458e8).(output);
60 }
61 else
62 fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "error creating curve string\n");
63 stp_curve_destroycxx . . $ stp_curve_destroy(357dc05c3c24eef1).(curve);
64 }
65 else
66 printfcxx . . $ printf(581fddd72a8db8fc).("curve is NULL!\n");
67
68 return 0;
69 }