/*
- * "$Id: testmime.c 5051 2006-02-02 16:13:16Z mike $"
+ * "$Id: testmime.c 7670 2008-06-17 22:42:08Z mike $"
*
* MIME test program for the Common UNIX Printing System (CUPS).
*
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* 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:
*
mime = NULL;
src = NULL;
dst = NULL;
- filter_path = "../filter:../pdftops";
+ filter_path = "../filter:../pdftops:" CUPS_SERVERBIN "/filter";
for (i = 1; i < argc; i ++)
if (!strcmp(argv[i], "-d"))
if (src)
printf("%s: %s/%s%s\n", argv[i], src->super, src->type,
compression ? " (gzipped)" : "");
+ else if ((src = mimeType(mime, "application", "octet-stream")) != NULL)
+ printf("%s: application/octet-stream\n", argv[i]);
else
{
printf("%s: unknown\n", argv[i]);
sscanf(argv[i], "%15[^/]/%31s", super, type);
dst = mimeType(mime, super, type);
- filters = mimeFilter(mime, src, dst, &cost, 10);
+ filters = mimeFilter(mime, src, dst, &cost);
if (!filters)
{
puts("MIME database types:");
for (src = mimeFirstType(mime); src; src = mimeNextType(mime))
{
- printf("\t%s/%s:\n", src->super, src->type);
+ printf("\t%s/%s (%d):\n", src->super, src->type, src->priority);
print_rules(src->rules);
puts("");
}
filter->dst->super, filter->dst->type,
filter->filter, filter->cost);
- type_dir(mime, "..");
+ type_dir(mime, "../doc");
+ type_dir(mime, "../man");
}
return (0);
while ((dent = cupsDirRead(dir)) != NULL)
{
+ if (dent->filename[0] == '.')
+ continue;
+
snprintf(filename, sizeof(filename), "%s/%s", dirname, dent->filename);
if (S_ISDIR(dent->fileinfo.st_mode))
printf("%s: %s/%s%s\n", filename, filetype->super, filetype->type,
compression ? " (compressed)" : "");
- filters = mimeFilter(mime, filetype, pstype, &cost, 10);
+ filters = mimeFilter(mime, filetype, pstype, &cost);
if (!filters)
puts(" No filters to convert application/vnd.cups-postscript.");
/*
- * End of "$Id: testmime.c 5051 2006-02-02 16:13:16Z mike $".
+ * End of "$Id: testmime.c 7670 2008-06-17 22:42:08Z mike $".
*/