~ubuntu-branches/debian/wheezy/ghostscript/wheezy

« back to all changes in this revision

Viewing changes to base/gdevpsdu.c

  • Committer: Package Import Robot
  • Author(s): Jonas Smedegaard
  • Date: 2012-02-10 19:27:35 UTC
  • mfrom: (1.2.7)
  • Revision ID: package-import@ubuntu.com-20120210192735-itmbfs6nfl8t9qm8
Tags: 9.05~dfsg-1
* New upstream release.
* Update copyright file:
  + Improve Copyright shortnames:
    - BSD → BSD-3-Clause
    - MIT~Open → NTP~Open
    - MIT~WSU → NTP~WSU
    - MIT~Lucent → NTP~Lucent
    - other-Adobe → BSD-3-Clause~Adobe
  + Fix merge double Files-Excluded, and list globbing before specific
    files.
  + Quote licenses in Comment fields.
  + Drop duplicate Comment fields.
  + Fix refer to license shortname AFPL~AFPL (not AFPL).
  + Extend copyright years.
  + Add new Files section, Apache-2.0 licensed (TrueType file, not
    linked code so not challenging GPL).
  + Drop a few Files sections and a License section.
* strip convenience library openjpeg from upstream source.
* Imported Upstream version 9.05~dfsg
* Drop patches 020110819 and 1001, applied upstream.
* Explicitly disable use of openjpeg: Now preferred if available but
  requires patching for ICC and CMYK support.
* Update symbols file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
323
323
            gs_free_object(mem, buf, "psdf_begin_binary(buf)");
324
324
            return_error(gs_error_VMerror);
325
325
        }
326
 
        ss->template = &s_A85E_template;
 
326
        ss->templat = &s_A85E_template;
327
327
        s_init_filter(s, (stream_state *)ss, buf, BUF_SIZE, pdev->strm);
328
328
#undef BUF_SIZE
329
329
        pbw->strm = s;
336
336
/* Add an encoding filter.  The client must have allocated the stream state, */
337
337
/* if any, using pdev->v_memory. */
338
338
int
339
 
psdf_encode_binary(psdf_binary_writer * pbw, const stream_template * template,
 
339
psdf_encode_binary(psdf_binary_writer * pbw, const stream_template * templat,
340
340
                   stream_state * ss)
341
341
{
342
 
    return (s_add_filter(&pbw->strm, template, ss, pbw->memory) == 0 ?
 
342
    return (s_add_filter(&pbw->strm, templat, ss, pbw->memory) == 0 ?
343
343
            gs_note_error(gs_error_VMerror) : 0);
344
344
}
345
345
 
392
392
        if (code < 0)
393
393
            return code;
394
394
        /* Create the filter. */
395
 
        jcdp->template = s_DCTE_template;
 
395
        jcdp->templat = s_DCTE_template;
396
396
        /* Make sure we get at least a full scan line of input. */
397
397
        ss->scan_line_size = jcdp->cinfo.input_components *
398
398
            jcdp->cinfo.image_width;
399
 
        jcdp->template.min_in_size =
 
399
        /* Profile not used in pdfwrite output */        
 
400
        ss->icc_profile = NULL; 
 
401
        jcdp->templat.min_in_size =
400
402
            max(s_DCTE_template.min_in_size, ss->scan_line_size);
401
403
        /* Make sure we can write the user markers in a single go. */
402
 
        jcdp->template.min_out_size =
 
404
        jcdp->templat.min_out_size =
403
405
            max(s_DCTE_template.min_out_size, ss->Markers.size);
404
406
        if (pbw)
405
 
            code = psdf_encode_binary(pbw, &jcdp->template, st);
 
407
            code = psdf_encode_binary(pbw, &jcdp->templat, st);
406
408
        if (code >= 0) {
407
409
            gs_c_param_list_release(&rcc_list);
408
410
            return 0;
421
423
psdf_CFE_binary(psdf_binary_writer * pbw, int w, int h, bool invert)
422
424
{
423
425
    gs_memory_t *mem = pbw->memory;
424
 
    const stream_template *template = &s_CFE_template;
 
426
    const stream_template *templat = &s_CFE_template;
425
427
    stream_CFE_state *st =
426
 
        gs_alloc_struct(mem, stream_CFE_state, template->stype,
 
428
        gs_alloc_struct(mem, stream_CFE_state, templat->stype,
427
429
                        "psdf_CFE_binary");
428
430
    int code;
429
431
 
430
432
    if (st == 0)
431
433
        return_error(gs_error_VMerror);
432
 
    (*template->set_defaults) ((stream_state *) st);
 
434
    (*templat->set_defaults) ((stream_state *) st);
433
435
    st->K = -1;
434
436
    st->Columns = w;
435
437
    st->Rows = 0;
436
438
    st->BlackIs1 = !invert;
437
 
    st->EndOfBlock = pbw->strm->state->template != &s_A85E_template;
438
 
    code = psdf_encode_binary(pbw, template, (stream_state *) st);
 
439
    st->EndOfBlock = pbw->strm->state->templat != &s_A85E_template;
 
440
    code = psdf_encode_binary(pbw, templat, (stream_state *) st);
439
441
    if (code < 0)
440
442
        gs_free_object(mem, st, "psdf_CFE_binary");
441
443
    return code;