]>
git.ipfire.org Git - thirdparty/cups.git/blob - backend/test1284.c
2 * "$Id: test1284.c 5591 2006-05-26 19:51:59Z mike $"
4 * IEEE-1284 support functions test program for the Common UNIX Printing
7 * Copyright 1997-2006 by Easy Software Products, all rights reserved.
9 * These coded instructions, statements, and computer programs are the
10 * property of Easy Software Products and are protected by Federal
11 * copyright law. Distribution and use rights are outlined in the file
12 * "LICENSE" which should have been included with this file. If this
13 * file is missing or damaged please contact Easy Software Products
16 * Attn: CUPS Licensing Information
17 * Easy Software Products
18 * 44141 Airport View Drive, Suite 204
19 * Hollywood, Maryland 20636 USA
21 * Voice: (301) 373-9600
22 * EMail: cups-info@cups.org
23 * WWW: http://www.cups.org
25 * This file is subject to the Apple OS-Developed Software exception.
32 * Include necessary headers.
35 #include <cups/string.h>
50 * 'main()' - Test the device-ID functions.
53 int /* O - Exit status */
54 main(int argc
, /* I - Number of command-line args */
55 char *argv
[]) /* I - Command-line arguments */
57 int i
, /* Looping var */
58 fd
; /* File descriptor */
59 char device_id
[1024], /* 1284 device ID string */
60 make_model
[1024], /* make-and-model string */
61 uri
[1024]; /* URI string */
66 puts("Usage: test1284 device-file [... device-file-N]");
70 for (i
= 1; i
< argc
; i
++)
72 if ((fd
= open(argv
[i
], O_RDWR
)) < 0)
78 printf("%s:\n", argv
[i
]);
80 backendGetDeviceID(fd
, device_id
, sizeof(device_id
), make_model
,
81 sizeof(make_model
), "test", uri
, sizeof(uri
));
83 printf(" device_id=\"%s\"\n", device_id
);
84 printf(" make_model=\"%s\"\n", make_model
);
85 printf(" uri=\"%s\"\n", uri
);
95 * End of "$Id: test1284.c 5591 2006-05-26 19:51:59Z mike $".