Debian Codegraph @

src/cups/commandtodyesub.c

raw symbols SCIP
1 /*
2 * Dyesub command filter for Gutenprint
3 *
4 *
5 * Contents:
6 *
7 * main() - Main entry and command processing.
8 */
9
10 /*
11 * Include necessary headers...
12 */
13
14 #include <cups/cups.h>
15 #include <ctype.h>
16 #include <stdlib.h>
17 #include <stdio.h>
18 #include <strings.h>
19
20
21 /*
22 * Macros...
23 */
24
25 #define pwritecxx . . $ `src/cups/commandtodyesub.c:25:9`!(s,n) fwrite((s), 1, (n), stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!)
26
27
28 /*
29 * 'main()' - Main entry and processing of driver.
30 */
31
32 int /* O - Exit status */
33 maincxx . . $ main(afcd3168fc1188a4).(int argc, /* I - Number of command-line arguments */
34 char *argv[]) /* I - Command-line arguments */
35 {
36 FILEcxx . . $ FILE# *fp; /* Command file */
37 char line[1024]; /* Line from file */
38
39
40 /*
41 * Check for valid arguments...
42 */
43
44 if (argc < 6 || argc > 7)
45 {
46 /*
47 * We don't have the correct number of arguments; write an error message
48 * and return.
49 */
50
51 fputscxx . . $ fputs(874fa6a5e59ab9bd).("ERROR: commandtocanon job-id user title copies options [file]\n", stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!);
52 return (1);
53 }
54
55 /*
56 * Open the command file as needed...
57 */
58
59 if (argc == 7)
60 {
61 if ((fp = fopencxx . . $ fopen(82ec0787cd37e0a3).(argv[6], "r")) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
62 {
63 perrorcxx . . $ perror(85c52e162fed56f9).("ERROR: Unable to open command file - ");
64 return (1);
65 }
66 }
67 else
68 fp = stdincxx . . $ `<external>/232824719582829767/stdio.h:153:9`!;
69
70 /* Just pass everything through as is */
71
72 while (fgetscxx . . $ fgets(efb0aaba7ac866ae).(line, sizeof(line), fp) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
73 {
74 pwritecxx . . $ `src/cups/commandtodyesub.c:25:9`!(line, strnlen(line, sizeof(line)));
75 }
76
77 /*
78 * Close the command file and return...
79 */
80
81 if (fp != stdincxx . . $ `<external>/232824719582829767/stdio.h:153:9`!)
82 fclosecxx . . $ fclose(89bc1efcdac0ca22).(fp);
83
84 return (0);
85 }
86
87
88 /*
89 */