/*
- * "$Id: testmime.c 7670 2008-06-17 22:42:08Z mike $"
+ * MIME test program for CUPS.
*
- * MIME test program for CUPS.
+ * Copyright 2007-2014 by Apple Inc.
+ * Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
- * Copyright 2007-2011 by Apple Inc.
- * Copyright 1997-2006 by Easy Software Products, all rights reserved.
- *
- * 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 the test program.
- * add_ppd_filter() - Add a printer filter from a PPD.
- * add_ppd_filters() - Add all filters from a PPD.
- * print_rules() - Print the rules for a file type...
- * type_dir() - Show the MIME types for a given directory.
+ * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
/*
}
else
{
- sscanf(argv[i], "%15[^/]/%31s", super, type);
+ sscanf(argv[i], "%15[^/]/%255s", super, type);
dst = mimeType(mime, super, type);
- filters = mimeFilter2(mime, src, srcinfo.st_size, dst, &cost);
+ filters = mimeFilter2(mime, src, (size_t)srcinfo.st_size, dst, &cost);
if (!filters)
{
mime_filter_t *filterptr; /* MIME filter */
- DEBUG_printf(("add_ppd_filter(mime=%p, filtertype=%p(%s/%s), filter=\"%s\")",
- mime, filtertype, filtertype->super, filtertype->type, filter));
-
/*
* Parse the filter string; it should be in one of the following formats:
*
{
char *ptr; /* Pointer into maxsize(nnnn) program */
- maxsize = strtoll(program + 8, &ptr, 10);
+ maxsize = (size_t)strtoll(program + 8, &ptr, 10);
if (*ptr != ')')
{
{
if (desttype != filtertype)
{
- DEBUG_printf(("add_ppd_filter: Adding filter %s/%s %s/%s %d %s",
- temptype->super, temptype->type, desttype->super,
- desttype->type, cost, program));
filterptr = mimeAddFilter(mime, temptype, desttype, cost, program);
if (!mimeFilterLookup(mime, desttype, filtertype))
- {
- DEBUG_printf(("add_printer_filter: Adding filter %s/%s %s/%s 0 -",
- desttype->super, desttype->type, filtertype->super,
- filtertype->type));
mimeAddFilter(mime, desttype, filtertype, 0, "-");
- }
}
else
- {
- DEBUG_printf(("add_printer_filter: Adding filter %s/%s %s/%s %d %s",
- temptype->super, temptype->type, filtertype->super,
- filtertype->type, cost, program));
filterptr = mimeAddFilter(mime, temptype, filtertype, cost, program);
- }
if (filterptr)
filterptr->maxsize = maxsize;
cupsDirClose(dir);
}
-
-
-/*
- * End of "$Id: testmime.c 7670 2008-06-17 22:42:08Z mike $".
- */