/*
- * "$Id: testsub.c 6649 2007-07-11 21:46:42Z mike $"
+ * Scheduler notification tester for CUPS.
*
- * Scheduler notification tester for CUPS.
+ * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2006-2007 by Easy Software Products.
*
- * Copyright 2007-2012 by Apple Inc.
- * Copyright 2006-2007 by Easy Software Products.
- *
- * These coded instructions, statements, and computer programs are the
- * property of Apple Inc. and are protected by Federal copyright
- * law. Distribution and use rights are outlined in the file "LICENSE.txt"
- * which should have been included with this file. If this file is
- * file is missing or damaged, see the license at "http://www.cups.org/".
- *
- * Contents:
- *
- * main() - Subscribe to the .
- * print_attributes() - Print the attributes in a request...
- * sigterm_handler() - Flag when the user hits CTRL-C...
- * usage() - Show program usage...
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law. Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file. If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
interval = 5;
ippDelete(response);
- sleep(interval);
+ sleep((unsigned)interval);
}
/*
case IPP_TAG_DATE :
{
- time_t vtime; /* Date/Time value */
- struct tm *vdate; /* Date info */
char vstring[256]; /* Formatted time */
for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
- {
- vtime = ippDateToTime(val->date);
- vdate = localtime(&vtime);
- strftime(vstring, sizeof(vstring), "%c", vdate);
- printf(" (%s)", vstring);
- }
+ printf(" (%s)", _cupsStrDate(vstring, sizeof(vstring), ippDateToTime(val->date)));
}
putchar('\n');
break;
puts("Usage: testsub [-E] [-e event ... -e eventN] [-h hostname] URI");
exit(0);
}
-
-
-
-/*
- * End of "$Id: testsub.c 6649 2007-07-11 21:46:42Z mike $".
- */