source: trunk/rexxlib/simple.c

Last change on this file was 60, checked in by Alex Taylor, 8 years ago

Add framework for REXX interface to CUPS API.

File size: 524 bytes
RevLine 
[60]1#include <stdio.h>
2#include <cups/cups.h>
3
4int main(void)
5{
6 int i;
7 cups_dest_t *dests, *dest;
8 int num_dests = cupsGetDests(&dests);
9
10 printf("%u destination%s found.\n", num_dests, (num_dests == 1)? "": "s");
11 for (i = num_dests, dest = dests; i > 0; i --, dest ++)
12 {
13 if (dest->instance)
14 printf("%s/%s", dest->name, dest->instance);
15 else
16 printf("%s", dest->name);
17 if (dest->is_default)
18 printf(" (Default)\n");
19 else
20 printf("\n");
21 }
22
23 return (0);
24}
Note: See TracBrowser for help on using the repository browser.