| 2171 | */ |
| 2172 | |
| 2173 | const 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 | /* |