• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/cups-372.4/cups/test/

Lines Matching +defs:format +defs:type

184 				      /* media-type-supported values */
245 *format; /* document-format */
285 static ipp_t *create_media_col(const char *media, const char *type,
317 static void html_printf(_ipp_client_t *client, const char *format,
343 const char *type, size_t length);
434 case 'f' : /* -f type/subtype[,...] */
841 * Get the requesting-user-name, document format, and priority...
857 if ((attr = ippFindAttribute(job->attrs, "document-format",
859 job->format = ippGetString(attr, 0, NULL);
861 job->format = "application/octet-stream";
924 const char *type, /* I - Nedua type */
935 snprintf(media_key, sizeof(media_key), "%s_%s%s", media, type,
949 ippAddString(media_col, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "media-type",
950 NULL, type);
990 const char *docformats, /* I - document-format-supported */
1010 int num_formats; /* Number of document-format-supported values */
1011 char *defformat, /* document-format-default value */
1012 *formats[100], /* document-format-supported values */
1093 "media-type"
1324 /* document-format-default */
1326 "document-format-default", NULL, defformat);
1328 /* document-format-supported */
1330 "document-format-supported", num_formats, NULL,
1527 /* media-type-supported */
1530 "media-type-supported",
1682 "pwg-raster-document-type-supported",
1761 int type) /* I - 0 = object, 1 = request, 2 = response */
1775 if (type == 1)
1778 else if (type == 2)
1927 const char *regtype, /* I - Service type */
2030 const char *format, /* I - Printf-style format string */
2036 type; /* Format type character */
2039 char tformat[100], /* Temporary format string for sprintf() */
2040 *tptr, /* Pointer into temporary format */
2046 * Loop through the format string, formatting as needed...
2049 va_start(ap, format);
2050 start = format;
2052 while (*format)
2054 if (*format == '%')
2056 if (format > start)
2057 httpWrite2(client->http, start, format - start);
2060 *tptr++ = *format++;
2062 if (*format == '%')
2065 format ++;
2068 else if (strchr(" -+#\'", *format))
2069 *tptr++ = *format++;
2071 if (*format == '*')
2077 format ++;
2087 while (isdigit(*format & 255))
2090 *tptr++ = *format;
2092 width = width * 10 + *format++ - '0';
2096 if (*format == '.')
2099 *tptr++ = *format;
2101 format ++;
2103 if (*format == '*')
2109 format ++;
2119 while (isdigit(*format & 255))
2122 *tptr++ = *format;
2124 prec = prec * 10 + *format++ - '0';
2129 if (*format == 'l' && format[1] == 'l')
2139 format += 2;
2141 else if (*format == 'h' || *format == 'l' || *format == 'L')
2144 *tptr++ = *format;
2146 size = *format++;
2152 if (!*format)
2154 start = format;
2159 *tptr++ = *format;
2161 type = *format++;
2163 start = format;
2165 switch (type)
2233 format ++;
2236 if (format > start)
2237 httpWrite2(client->http, start, format - start);
2720 if (!_cups_strcasecmp(job->format, "image/jpeg"))
2723 else if (!_cups_strcasecmp(job->format, "image/png"))
2726 else if (!_cups_strcasecmp(job->format, "image/pwg-raster"))
2729 else if (!_cups_strcasecmp(job->format, "application/pdf"))
2732 else if (!_cups_strcasecmp(job->format, "application/postscript"))
2955 if (!_cups_strcasecmp(job->format, "image/jpeg"))
2958 else if (!_cups_strcasecmp(job->format, "image/png"))
2961 else if (!_cups_strcasecmp(job->format, "application/pdf"))
2964 else if (!_cups_strcasecmp(job->format, "application/postscript"))
3221 * Get the document format for the job...
3226 if ((attr = ippFindAttribute(job->attrs, "document-format",
3228 job->format = ippGetString(attr, 0, NULL);
3230 job->format = "application/octet-stream";
3236 if (!_cups_strcasecmp(job->format, "image/jpeg"))
3239 else if (!_cups_strcasecmp(job->format, "image/png"))
3242 else if (!_cups_strcasecmp(job->format, "application/pdf"))
3245 else if (!_cups_strcasecmp(job->format, "application/postscript"))
3511 * Get the document format for the job...
3516 if ((attr = ippFindAttribute(job->attrs, "document-format",
3518 job->format = ippGetString(attr, 0, NULL);
3520 job->format = "application/octet-stream";
3526 if (!_cups_strcasecmp(job->format, "image/jpeg"))
3529 else if (!_cups_strcasecmp(job->format, "image/png"))
3532 else if (!_cups_strcasecmp(job->format, "application/pdf"))
3535 else if (!_cups_strcasecmp(job->format, "application/postscript"))
4007 "type=\"image/png\">\n"
4415 regtype[256]; /* Bonjour service type */
4457 * Register the _printer._tcp (LPD) service type with a port number of 0 to
4478 * Then register the _ipp._tcp (IPP) service type with the real port number to
4506 * Then register the _ipps._tcp (IPP) service type with the real port number to
4534 * Similarly, register the _http._tcp,_printer (HTTP) service type with the
4568 const char *type, /* I - MIME media type of response */
4589 if (!type && !length && code != HTTP_STATUS_OK)
4593 type = "text/plain";
4609 if (type)
4611 if (!strcmp(type, "text/html"))
4615 httpSetField(client->http, HTTP_FIELD_CONTENT_TYPE, type);
4832 puts("-f type/subtype[,...] List of supported types "
4872 *format = NULL; /* document-format value */
4911 * Is it a format we support?
4914 if ((attr = ippFindAttribute(client->request, "document-format",
4925 format = ippGetString(attr, 0, NULL);
4927 fprintf(stderr, "%s %s document-format=\"%s\"\n",
4928 client->hostname, op_name, format);
4933 format = ippGetString(ippFindAttribute(client->printer->attrs,
4934 "document-format-default",
4936 if (!format)
4937 format = "application/octet-stream"; /* Should never happen */
4940 "document-format", NULL, format);
4943 if (!strcmp(format, "application/octet-stream") &&
4948 * Auto-type the file using the first 4 bytes of the file...
4957 format = "application/pdf";
4959 format = "application/postscript";
4962 format = "image/jpeg";
4964 format = "image/png";
4966 if (format)
4967 fprintf(stderr, "%s %s Auto-typed document-format=\"%s\"\n",
4968 client->hostname, op_name, format);
4972 "document-format", NULL, format);
4974 ippSetString(client->request, &attr, 0, format);
4979 "document-format-supported",
4981 !ippContainsString(supported, format))