• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/tcl-102/tcl_ext/tkimg/tkimg/compat/libtiff/libtiff/

Lines Matching refs:sp

90 	ZIPState* sp = DecoderState(tif);
93 assert(sp != NULL);
96 if (sp->state & ZSTATE_INIT_ENCODE) {
97 deflateEnd(&sp->stream);
98 sp->state = 0;
101 if (inflateInit(&sp->stream) != Z_OK) {
102 TIFFErrorExt(tif->tif_clientdata, module, "%s: %s", tif->tif_name, sp->stream.msg);
105 sp->state |= ZSTATE_INIT_DECODE;
116 ZIPState* sp = DecoderState(tif);
119 assert(sp != NULL);
121 if( (sp->state & ZSTATE_INIT_DECODE) == 0 )
124 sp->stream.next_in = tif->tif_rawdata;
125 sp->stream.avail_in = tif->tif_rawcc;
126 return (inflateReset(&sp->stream) == Z_OK);
132 ZIPState* sp = DecoderState(tif);
136 assert(sp != NULL);
137 assert(sp->state == ZSTATE_INIT_DECODE);
139 sp->stream.next_out = op;
140 sp->stream.avail_out = occ;
142 int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);
148 tif->tif_name, tif->tif_row, sp->stream.msg);
149 if (inflateSync(&sp->stream) != Z_OK)
155 tif->tif_name, sp->stream.msg);
158 } while (sp->stream.avail_out > 0);
159 if (sp->stream.avail_out != 0) {
162 tif->tif_name, tif->tif_row, sp->stream.avail_out);
171 ZIPState* sp = EncoderState(tif);
174 assert(sp != NULL);
175 if (sp->state & ZSTATE_INIT_DECODE) {
176 inflateEnd(&sp->stream);
177 sp->state = 0;
180 if (deflateInit(&sp->stream, sp->zipquality) != Z_OK) {
181 TIFFErrorExt(tif->tif_clientdata, module, "%s: %s", tif->tif_name, sp->stream.msg);
184 sp->state |= ZSTATE_INIT_ENCODE;
195 ZIPState *sp = EncoderState(tif);
198 assert(sp != NULL);
199 if( sp->state != ZSTATE_INIT_ENCODE )
202 sp->stream.next_out = tif->tif_rawdata;
203 sp->stream.avail_out = tif->tif_rawdatasize;
204 return (deflateReset(&sp->stream) == Z_OK);
213 ZIPState *sp = EncoderState(tif);
216 assert(sp != NULL);
217 assert(sp->state == ZSTATE_INIT_ENCODE);
220 sp->stream.next_in = bp;
221 sp->stream.avail_in = cc;
223 if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) {
225 tif->tif_name, sp->stream.msg);
228 if (sp->stream.avail_out == 0) {
231 sp->stream.next_out = tif->tif_rawdata;
232 sp->stream.avail_out = tif->tif_rawdatasize;
234 } while (sp->stream.avail_in > 0);
245 ZIPState *sp = EncoderState(tif);
249 sp->stream.avail_in = 0;
251 state = deflate(&sp->stream, Z_FINISH);
255 if ((int)sp->stream.avail_out != (int)tif->tif_rawdatasize)
258 tif->tif_rawdatasize - sp->stream.avail_out;
260 sp->stream.next_out = tif->tif_rawdata;
261 sp->stream.avail_out = tif->tif_rawdatasize;
266 tif->tif_name, sp->stream.msg);
276 ZIPState* sp = ZState(tif);
278 assert(sp != 0);
282 tif->tif_tagmethods.vgetfield = sp->vgetparent;
283 tif->tif_tagmethods.vsetfield = sp->vsetparent;
285 if (sp->state & ZSTATE_INIT_ENCODE) {
286 deflateEnd(&sp->stream);
287 sp->state = 0;
288 } else if( sp->state & ZSTATE_INIT_DECODE) {
289 inflateEnd(&sp->stream);
290 sp->state = 0;
292 _TIFFfree(sp);
301 ZIPState* sp = ZState(tif);
306 sp->zipquality = va_arg(ap, int);
307 if ( sp->state&ZSTATE_INIT_ENCODE ) {
308 if (deflateParams(&sp->stream,
309 sp->zipquality, Z_DEFAULT_STRATEGY) != Z_OK) {
311 tif->tif_name, sp->stream.msg);
317 return (*sp->vsetparent)(tif, tag, ap);
325 ZIPState* sp = ZState(tif);
329 *va_arg(ap, int*) = sp->zipquality;
332 return (*sp->vgetparent)(tif, tag, ap);
346 ZIPState* sp;
367 sp = ZState(tif);
368 sp->stream.zalloc = NULL;
369 sp->stream.zfree = NULL;
370 sp->stream.opaque = NULL;
371 sp->stream.data_type = Z_BINARY;
376 sp->vgetparent = tif->tif_tagmethods.vgetfield;
378 sp->vsetparent = tif->tif_tagmethods.vsetfield;
382 sp->zipquality = Z_DEFAULT_COMPRESSION; /* default comp. level */
383 sp->state = 0;