/*
- * "$Id: lpmove.c 4945 2006-01-18 21:41:17Z mike $"
+ * "$Id: lpmove.c 6649 2007-07-11 21:46:42Z mike $"
*
* "lpmove" command for the Common UNIX Printing System (CUPS).
*
+ * Copyright 2007 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
- * property of Easy Software Products 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 missing or damaged please contact Easy Software Products
- * at:
- *
- * Attn: CUPS Licensing Information
- * Easy Software Products
- * 44141 Airport View Drive, Suite 204
- * Hollywood, Maryland 20636 USA
- *
- * Voice: (301) 373-9600
- * EMail: cups-info@cups.org
- * WWW: http://www.cups.org
+ * 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:
*
*dest; /* New destination */
+ _cupsSetLocale(argv);
+
dest = NULL;
dests = NULL;
http = NULL;
if ((job = strrchr(argv[i], '-')) != NULL &&
cupsGetDest(argv[i], NULL, num_dests, dests) == NULL)
jobid = atoi(job + 1);
+ else if (isdigit(argv[i][0] & 255) &&
+ !cupsGetDest(argv[i], NULL, num_dests, dests))
+ jobid = atoi(argv[i]);
else
src = argv[i];
}
}
else
{
- httpAssembleURIf(job_uri, sizeof(job_uri), "ipp", NULL, "localhost", 0,
- "/printers/%s", src);
+ httpAssembleURIf(HTTP_URI_CODING_ALL, job_uri, sizeof(job_uri), "ipp", NULL,
+ "localhost", 0, "/printers/%s", src);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL,
job_uri);
}
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
NULL, cupsUser());
- httpAssembleURIf(printer_uri, sizeof(printer_uri), "ipp", NULL, "localhost", 0,
- "/printers/%s", dest);
+ httpAssembleURIf(HTTP_URI_CODING_ALL, printer_uri, sizeof(printer_uri),
+ "ipp", NULL, "localhost", 0, "/printers/%s", dest);
ippAddString(request, IPP_TAG_JOB, IPP_TAG_URI, "job-printer-uri",
NULL, printer_uri);
/*
- * End of "$Id: lpmove.c 4945 2006-01-18 21:41:17Z mike $".
+ * End of "$Id: lpmove.c 6649 2007-07-11 21:46:42Z mike $".
*/