Lines Matching defs:nch

424   unsigned    nch)
434 if (nch == 0) { /* this is an EOF */
444 while (nch > 0) {
453 if (nch == 0) return;
456 --nch;
461 if (nch + cc->nObjBufChars < (unsigned) minSize) {
462 os_bcopy(buf, b + cc->nObjBufChars, nch);
463 cc->nObjBufChars += nch;
469 nch -= minSize - cc->nObjBufChars;
486 if (nch + cc->nObjBufChars < m) {
487 os_bcopy(buf, cc->objBuf + cc->nObjBufChars, nch);
488 cc->nObjBufChars += nch;
494 nch -= m - cc->nObjBufChars;
499 oldNch = nch;
501 nch = cc->nObjBufChars;
508 if (cc->contextFlags & DPS_FLAG_NO_BINARY_CONVERSION) n = nch;
510 for (n = 0; n < nch &&
517 nch -= n;
519 if (nch != 0) {
528 if (nch < DPS_SEQ_MIN) {
530 DPSAssertWarn(nch == 1 && !oldBuf, cc, "illegal binary output from context (oldBuf)");
532 cc->nObjBufChars = nch;
541 and we have already tested nch to be at least DPS_SEQ_MIN */
542 DPSAssertWarn(!oldBuf && nch > 1, cc, "return values garbled (oldBuf||nch<DPS_SEQ_MIN");
548 nch -= DPS_SEQ_MIN;
555 if (nch < minSize) {
560 cc->nObjBufChars = nch;
561 while (nch--) *tb++ = *buf++;
575 if (nch < m) {
577 DPSAssertWarn(!oldBuf, cc, "return values garbled (oldBuf&&nch<m");
579 cc->nObjBufChars = nch;
580 os_bcopy(buf, cc->objBuf, nch);
616 nch -= m;
617 } /* if (nch != 0) ... the next binary object sequence from a server */
619 DPSAssertWarn(nch == 0, cc, "some return values/data lost (nch)");
622 nch = oldNch;
624 } /* while (nch > 0) */
2028 static void textWriteData(DPSContext ctxt, char *buf, unsigned int nch)
2030 (*ctxt->textProc)(ctxt, buf, nch);
2031 if (ctxt->chainChild != NIL) DPSWriteData(ctxt->chainChild, buf, nch);
2054 DPSContext ctxt, char *buf, unsigned int nch)
2057 while (nch > 0) {
2069 nch -= nn;
2076 if (nch + cc->nOutBufChars < (unsigned) bst) {
2077 os_bcopy(buf, cc->outBuf + cc->nOutBufChars, nch);
2078 cc->nOutBufChars += nch;
2083 nch -= bst - cc->nOutBufChars;
2093 if (nch + cc->nOutBufChars < m) {
2094 os_bcopy(buf, cc->outBuf + cc->nOutBufChars, nch);
2095 cc->nOutBufChars += nch;
2100 nch -= m - cc->nOutBufChars;
2103 oldNch = nch;
2105 nch = cc->nOutBufChars;
2112 if (cc->contextFlags & DPS_FLAG_NO_BINARY_CONVERSION) n = nch;
2114 for (n = 0; n < nch &&
2128 nch -= n;
2130 if (nch != 0) {
2134 if (!IsBinaryToken(buf[0]) && nch < DPS_SEQ_MIN) {
2136 DPSAssertWarn(nch == 1 && !oldBuf, cc, "problem converting binary token/sequence (nch!=1||oldBuf)");
2138 cc->nOutBufChars = nch;
2143 if (nch < (unsigned)bst || nch < (m = GetNBytes((unsigned char *) buf))) {
2146 if (nch < (unsigned) bst) {
2152 cc->nOutBufChars = nch;
2153 os_bcopy(buf, cc->outBuf, nch);
2163 DPSAssertWarn(nch == m, cc, "some converted PostScript language may be lost during error recovery (nch!=m)");
2170 DPSAssertWarn(nch == m, cc, "some converted PostScript language may be lost (nch!=m)");
2173 nch = oldNch;
2178 nch -= m;
2180 } /* if (nch != 0) */
2181 } /* while (nch > 0) */
2185 DPSContext ctxt, char *buf, unsigned int nch)
2192 textInnerWritePostScript(ctxt, buf, nch);
2199 DPSWritePostScript(ctxt->chainChild, buf, nch);
2204 DPSContext ctxt, char *buf, unsigned int nch)
2213 textInnerWritePostScript(ctxt, buf, nch);
2220 DPSWriteStringChars(ctxt->chainChild, buf, nch);
2225 DPSContext ctxt, char *buf, unsigned int nch)
2237 textInnerWritePostScript(ctxt, buf, nch);
2244 DPSBinObjSeqWrite(ctxt->chainChild, buf, nch);