]>
git.ipfire.org Git - thirdparty/cups.git/blob - backend/test1284.c
2 * "$Id: test1284.c 4903 2006-01-10 20:02:46Z 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>
49 * 'main()' - Test the device-ID functions.
52 int /* O - Exit status */
53 main(int argc
, /* I - Number of command-line args */
54 char *argv
[]) /* I - Command-line arguments */
56 int i
, /* Looping var */
57 fd
; /* File descriptor */
58 char device_id
[1024], /* 1284 device ID string */
59 make_model
[1024], /* make-and-model string */
60 uri
[1024]; /* URI string */
65 puts("Usage: test1284 device-file [... device-file-N]");
69 for (i
= 1; i
< argc
; i
++)
71 if ((fd
= open(argv
[i
], O_RDWR
)) < 0)
77 printf("%s:\n", argv
[i
]);
79 get_device_id(fd
, device_id
, sizeof(device_id
), make_model
,
80 sizeof(make_model
), "test", uri
, sizeof(uri
));
82 printf(" device_id=\"%s\"\n", device_id
);
83 printf(" make_model=\"%s\"\n", make_model
);
84 printf(" uri=\"%s\"\n", uri
);
94 * End of "$Id: test1284.c 4903 2006-01-10 20:02:46Z mike $".