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

Function ppdOpen

cups/ppd.c:2168–2195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2166 */
2167
2168ppd_file_t * /* O - PPD file record */
2169ppdOpen(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/*

Callers

nothing calls this directly

Calls 3

cupsFileOpenFdFunction · 0.85
_ppdOpenFunction · 0.85
cupsFileCloseFunction · 0.85

Tested by

no test coverage detected