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

Function ppdEmitAfterOrder

cups/ppd-emit.c:245–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243 */
244
245int /* O - 0 on success, -1 on failure */
246ppdEmitAfterOrder(
247 ppd_file_t *ppd, /* I - PPD file record */
248 FILE *fp, /* I - File to write to */
249 ppd_section_t section, /* I - Section to write */
250 int limit, /* I - Non-zero to use min_order */
251 float min_order) /* I - Lowest OrderDependency */
252{
253 char *buffer; /* Option code */
254 int status; /* Return status */
255
256
257 /*
258 * Range check input...
259 */
260
261 if (!ppd || !fp)
262 return (-1);
263
264 /*
265 * Get the string...
266 */
267
268 buffer = ppdEmitString(ppd, section, limit ? min_order : 0.0f);
269
270 /*
271 * Write it as needed and return...
272 */
273
274 if (buffer)
275 {
276 status = fputs(buffer, fp) < 0 ? -1 : 0;
277
278 free(buffer);
279 }
280 else
281 status = 0;
282
283 return (status);
284}
285
286
287/*

Callers 1

ppdEmitFunction · 0.85

Calls 1

ppdEmitStringFunction · 0.85

Tested by

no test coverage detected