]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cgi-bin/jobs.c
Remove all of the Subversion keywords from various source files.
[thirdparty/cups.git] / cgi-bin / jobs.c
index dc79aec708785a1765885e229b7f35c5356b46c0..a0d7c4b222289a418d19303f0ee1c6f884d176f3 100644 (file)
@@ -1,21 +1,14 @@
 /*
- * "$Id: jobs.c 7237 2008-01-22 01:38:39Z mike $"
+ * Job status CGI for CUPS.
  *
- *   Job status CGI for CUPS.
+ * Copyright 2007-2014 by Apple Inc.
+ * Copyright 1997-2006 by Easy Software Products.
  *
- *   Copyright 2007-2011 by Apple Inc.
- *   Copyright 1997-2006 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()      - Main entry for CGI.
- *   do_job_op() - Do a job operation.
+ * 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/".
  */
 
 /*
@@ -37,8 +30,7 @@ static void   do_job_op(http_t *http, int job_id, ipp_op_t op);
  */
 
 int                                    /* O - Exit status */
-main(int  argc,                                /* I - Number of command-line arguments */
-     char *argv[])                     /* I - Command-line arguments */
+main(void)
 {
   http_t       *http;                  /* Connection to the server */
   const char   *op;                    /* Operation name */
@@ -182,7 +174,7 @@ do_job_op(http_t      *http,                /* I - HTTP connection */
     char       url[1024];              /* Encoded URL */
 
 
-    strcpy(url, "5;URL=");
+    strlcpy(url, "5;URL=", sizeof(url));
     cgiFormEncode(url + 6, getenv("HTTP_REFERER"), sizeof(url) - 6);
     cgiSetVariable("refresh_page", url);
   }
@@ -195,7 +187,7 @@ do_job_op(http_t      *http,                /* I - HTTP connection */
   cgiStartHTML(cgiText(_("Jobs")));
 
   if (cupsLastError() > IPP_OK_CONFLICT)
-    cgiShowIPPError(_("Job operation failed:"));
+    cgiShowIPPError(_("Job operation failed"));
   else if (op == IPP_CANCEL_JOB)
     cgiCopyTemplateLang("job-cancel.tmpl");
   else if (op == IPP_HOLD_JOB)
@@ -207,8 +199,3 @@ do_job_op(http_t      *http,                /* I - HTTP connection */
 
   cgiEndHTML();
 }
-
-
-/*
- * End of "$Id: jobs.c 7237 2008-01-22 01:38:39Z mike $".
- */