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

Function cupsFilePeekChar

cups/file.c:1326–1349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1324 */
1325
1326int /* O - Character or -1 on end of file */
1327cupsFilePeekChar(cups_file_t *fp) /* I - CUPS file */
1328{
1329 /*
1330 * Range check input...
1331 */
1332
1333 if (!fp || (fp->mode != 'r' && fp->mode != 's'))
1334 return (-1);
1335
1336 /*
1337 * If the input buffer is empty, try to read more data...
1338 */
1339
1340 if (fp->ptr >= fp->end)
1341 if (cups_fill(fp) <= 0)
1342 return (-1);
1343
1344 /*
1345 * Return the next character in the buffer...
1346 */
1347
1348 return (*(fp->ptr) & 255);
1349}
1350
1351
1352/*

Callers 3

peekMethod · 0.85
check_basicsFunction · 0.85
ppd_readFunction · 0.85

Calls 1

cups_fillFunction · 0.85

Tested by 1

check_basicsFunction · 0.68