MCPcopy Create free account
hub / github.com/OpenPrinting/cups / _ppdCacheGetBin

Function _ppdCacheGetBin

cups/ppd-cache.c:2173–2198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2171 */
2172
2173const char * /* O - output-bin or NULL */
2174_ppdCacheGetBin(
2175 _ppd_cache_t *pc, /* I - PPD cache and mapping data */
2176 const char *output_bin) /* I - PPD OutputBin string */
2177{
2178 int i; /* Looping var */
2179
2180
2181 /*
2182 * Range check input...
2183 */
2184
2185 if (!pc || !output_bin)
2186 return (NULL);
2187
2188 /*
2189 * Look up the OutputBin string...
2190 */
2191
2192
2193 for (i = 0; i < pc->num_bins; i ++)
2194 if (!_cups_strcasecmp(output_bin, pc->bins[i].ppd) || !_cups_strcasecmp(output_bin, pc->bins[i].pwg))
2195 return (pc->bins[i].pwg);
2196
2197 return (NULL);
2198}
2199
2200
2201/*

Callers 2

_cupsConvertOptionsFunction · 0.85
mainFunction · 0.85

Calls 1

_cups_strcasecmpFunction · 0.85

Tested by 1

mainFunction · 0.68