| 2166 | */ |
| 2167 | |
| 2168 | ppd_file_t * /* O - PPD file record */ |
| 2169 | ppdOpen(FILE *fp) /* I - File to read from */ |
| 2170 | { |
| 2171 | ppd_file_t *ppd; /* PPD file record */ |
| 2172 | cups_file_t *cf; /* CUPS file */ |
| 2173 | |
| 2174 | |
| 2175 | /* |
| 2176 | * Reopen the stdio file as a CUPS file... |
| 2177 | */ |
| 2178 | |
| 2179 | if ((cf = cupsFileOpenFd(fileno(fp), "r")) == NULL) |
| 2180 | return (NULL); |
| 2181 | |
| 2182 | /* |
| 2183 | * Load the PPD file using the newer API... |
| 2184 | */ |
| 2185 | |
| 2186 | ppd = _ppdOpen(cf, _PPD_LOCALIZATION_DEFAULT); |
| 2187 | |
| 2188 | /* |
| 2189 | * Close the CUPS file and return the PPD... |
| 2190 | */ |
| 2191 | |
| 2192 | cupsFileClose(cf); |
| 2193 | |
| 2194 | return (ppd); |
| 2195 | } |
| 2196 | |
| 2197 | |
| 2198 | /* |
nothing calls this directly
no test coverage detected