]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/testsub.c
Remove all of the Subversion keywords from various source files.
[thirdparty/cups.git] / scheduler / testsub.c
index 88294a357da7b3a8cadd497e6730b23d39a9b584..2475f347c5c4de2fa9caf91b21713034171a7783 100644 (file)
@@ -1,23 +1,14 @@
 /*
- * "$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/".
  */
 
 /*
@@ -251,7 +242,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
       interval = 5;
 
     ippDelete(response);
-    sleep(interval);
+    sleep((unsigned)interval);
   }
 
  /*
@@ -435,17 +426,10 @@ print_attributes(ipp_t *ipp,              /* I - IPP request */
 
       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;
@@ -515,9 +499,3 @@ usage(void)
   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 $".
- */