]> git.ipfire.org Git - thirdparty/cups.git/blob - backend/betest.c
Remove svn:keywords since they cause svn_load_dirs.pl to complain about every file.
[thirdparty/cups.git] / backend / betest.c
1 /*
2 * "$Id: betest.c 177 2006-06-21 00:20:03Z jlovell $"
3 *
4 * Backend test program for the Common UNIX Printing System (CUPS).
5 *
6 * Copyright 1997-2005 by Easy Software Products, all rights reserved.
7 *
8 * These coded instructions, statements, and computer programs are the
9 * property of Easy Software Products and are protected by Federal
10 * copyright law. Distribution and use rights are outlined in the file
11 * "LICENSE" which should have been included with this file. If this
12 * file is missing or damaged please contact Easy Software Products
13 * at:
14 *
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
19 *
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
23 *
24 * This file is subject to the Apple OS-Developed Software exception.
25 *
26 * Contents:
27 *
28 * main() - Run the named backend.
29 */
30
31 /*
32 * Include necessary headers.
33 */
34
35 #include <stdio.h>
36 #include <stdlib.h>
37 #include <cups/string.h>
38 #include <unistd.h>
39
40
41 /*
42 * 'main()' - Run the named backend.
43 *
44 * Usage:
45 *
46 * betest device-uri job-id user title copies options [file]
47 */
48
49 int /* O - Exit status */
50 main(int argc, /* I - Number of command-line arguments (7 or 8) */
51 char *argv[]) /* I - Command-line arguments */
52 {
53 char backend[255]; /* Method in URI */
54
55
56 if (argc < 7 || argc > 8)
57 {
58 fputs("Usage: betest device-uri job-id user title copies options [file]\n",
59 stderr);
60 return (1);
61 }
62
63 /*
64 * Extract the method from the device-uri - that's the program we want to
65 * execute.
66 */
67
68 if (sscanf(argv[1], "%254[^:]", backend) != 1)
69 {
70 fputs("betest: Bad device-uri - no colon!\n", stderr);
71 return (1);
72 }
73
74 /*
75 * Execute and return
76 */
77
78 execl(backend, argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7],
79 NULL);
80
81 return (1);
82 }
83
84
85 /*
86 * End of "$Id: betest.c 177 2006-06-21 00:20:03Z jlovell $".
87 */