~ubuntu-branches/ubuntu/hardy/ghostscript/hardy

« back to all changes in this revision

Viewing changes to src/zcie.c

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2007-11-22 12:17:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122121743-cd70s3ypq0r243mp
Tags: 8.61.dfsg.1-0ubtuntu1
* New upstream release
  o Final 8.61 release
* debian/patches/09_ijs_krgb_support.dpatch: Adapted to upstream changes.
* debian/rules: Updated CUPS-related variables for "make install" calls.
* debian/rules: Remove /usr/include/ghostscript from the ghostscript
  package, they go into lings-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12
12
*/
13
13
 
14
 
/* $Id: zcie.c 8022 2007-06-05 22:23:38Z giles $ */
 
14
/* $Id: zcie.c 8250 2007-09-25 13:31:24Z giles $ */
15
15
/* CIE color operators */
16
16
#include "math_.h"
17
17
#include "memory_.h"
156
156
/* Process a 3- or 4-dimensional lookup table from a dictionary. */
157
157
/* The caller has set pclt->n and pclt->m. */
158
158
/* ptref is known to be a readable array of size at least n+1. */
159
 
private int cie_3d_table_param(const ref * ptable, uint count, uint nbytes,
 
159
static int cie_3d_table_param(const ref * ptable, uint count, uint nbytes,
160
160
                               gs_const_string * strings);
161
161
int
162
162
cie_table_param(const ref * ptref, gx_color_lookup_table * pclt,
214
214
    pclt->table = table;
215
215
    return 0;
216
216
}
217
 
private int
 
217
static int
218
218
cie_3d_table_param(const ref * ptable, uint count, uint nbytes,
219
219
                   gs_const_string * strings)
220
220
{
240
240
/* ------ CIE setcolorspace ------ */
241
241
 
242
242
/* Common code for the CIEBased* cases of setcolorspace. */
243
 
private int
 
243
static int
244
244
cie_lmnp_param(const gs_memory_t *mem, const ref * pdref, gs_cie_common * pcie, ref_cie_procs * pcprocs)
245
245
{
246
246
    int code;
256
256
}
257
257
 
258
258
/* Common code for the CIEBasedABC/DEF[G] cases of setcolorspace. */
259
 
private int
 
259
static int
260
260
cie_abc_param(const gs_memory_t *mem, const ref * pdref, gs_cie_abc * pcie, ref_cie_procs * pcprocs)
261
261
{
262
262
    int code;
290
290
}
291
291
 
292
292
/* Forward references */
293
 
private int cache_common(i_ctx_t *, gs_cie_common *, const ref_cie_procs *,
 
293
static int cache_common(i_ctx_t *, gs_cie_common *, const ref_cie_procs *,
294
294
                         void *, gs_ref_memory_t *);
295
 
private int cache_abc_common(i_ctx_t *, gs_cie_abc *, const ref_cie_procs *,
 
295
static int cache_abc_common(i_ctx_t *, gs_cie_abc *, const ref_cie_procs *,
296
296
                             void *, gs_ref_memory_t *);
297
297
 
298
298
/* <dict> .setciedefgspace - */
299
 
private int cie_defg_finish(i_ctx_t *);
300
 
private int
 
299
static int cie_defg_finish(i_ctx_t *);
 
300
static int
301
301
zsetciedefgspace(i_ctx_t *i_ctx_p)
302
302
{
303
303
    os_ptr op = osp;
340
340
        DO_NOTHING;
341
341
    return cie_set_finish(i_ctx_p, pcs, &procs, edepth, code);
342
342
}
343
 
private int
 
343
static int
344
344
cie_defg_finish(i_ctx_t *i_ctx_p)
345
345
{
346
346
    os_ptr op = osp;
355
355
}
356
356
 
357
357
/* <dict> .setciedefspace - */
358
 
private int cie_def_finish(i_ctx_t *);
359
 
private int
 
358
static int cie_def_finish(i_ctx_t *);
 
359
static int
360
360
zsetciedefspace(i_ctx_t *i_ctx_p)
361
361
{
362
362
    os_ptr op = osp;
399
399
        DO_NOTHING;
400
400
    return cie_set_finish(i_ctx_p, pcs, &procs, edepth, code);
401
401
}
402
 
private int
 
402
static int
403
403
cie_def_finish(i_ctx_t *i_ctx_p)
404
404
{
405
405
    os_ptr op = osp;
414
414
}
415
415
 
416
416
/* <dict> .setcieabcspace - */
417
 
private int cie_abc_finish(i_ctx_t *);
418
 
private int
 
417
static int cie_abc_finish(i_ctx_t *);
 
418
static int
419
419
zsetcieabcspace(i_ctx_t *i_ctx_p)
420
420
{
421
421
    os_ptr op = osp;
443
443
        DO_NOTHING;
444
444
    return cie_set_finish(i_ctx_p, pcs, &procs, edepth, code);
445
445
}
446
 
private int
 
446
static int
447
447
cie_abc_finish(i_ctx_t *i_ctx_p)
448
448
{
449
449
    os_ptr op = osp;
457
457
}
458
458
 
459
459
/* <dict> .setcieaspace - */
460
 
private int cie_a_finish(i_ctx_t *);
461
 
private int
 
460
static int cie_a_finish(i_ctx_t *);
 
461
static int
462
462
zsetcieaspace(i_ctx_t *i_ctx_p)
463
463
{
464
464
    os_ptr op = osp;
491
491
    pcie->DecodeA = DecodeA_default;
492
492
    return cie_set_finish(i_ctx_p, pcs, &procs, edepth, code);
493
493
}
494
 
private int
 
494
static int
495
495
cie_a_finish(i_ctx_t *i_ctx_p)
496
496
{
497
497
    os_ptr op = osp;
506
506
 
507
507
/* Common cache code */
508
508
 
509
 
private int
 
509
static int
510
510
cache_abc_common(i_ctx_t *i_ctx_p, gs_cie_abc * pcie,
511
511
                 const ref_cie_procs * pcprocs,
512
512
                 void *container, gs_ref_memory_t * imem)
521
521
            cache_common(i_ctx_p, &pcie->common, pcprocs, pcie, imem));
522
522
}
523
523
 
524
 
private int
 
524
static int
525
525
cache_common(i_ctx_t *i_ctx_p, gs_cie_common * pcie,
526
526
             const ref_cie_procs * pcprocs,
527
527
             void *container, gs_ref_memory_t * imem)
535
535
/* ------ Internal routines ------ */
536
536
 
537
537
/* Prepare to cache the values for one or more procedures. */
538
 
private int cie_cache_finish1(i_ctx_t *);
539
 
private int cie_cache_finish(i_ctx_t *);
 
538
static int cie_cache_finish1(i_ctx_t *);
 
539
static int cie_cache_finish(i_ctx_t *);
540
540
int
541
541
cie_prepare_cache(i_ctx_t *i_ctx_p, const gs_range * domain, const ref * proc,
542
542
                  cie_cache_floats * pcache, void *container,
592
592
}
593
593
 
594
594
/* Store the result of caching one procedure. */
595
 
private int
 
595
static int
596
596
cie_cache_finish_store(i_ctx_t *i_ctx_p, bool replicate)
597
597
{
598
598
    os_ptr op = osp;
636
636
    esp -= 2;                   /* pop pointer to cache */
637
637
    return o_pop_estack;
638
638
}
639
 
private int
 
639
static int
640
640
cie_cache_finish(i_ctx_t *i_ctx_p)
641
641
{
642
642
    return cie_cache_finish_store(i_ctx_p, false);
643
643
}
644
 
private int
 
644
static int
645
645
cie_cache_finish1(i_ctx_t *i_ctx_p)
646
646
{
647
647
    return cie_cache_finish_store(i_ctx_p, true);