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

« back to all changes in this revision

Viewing changes to src/gsclipsr.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: gsclipsr.c 8022 2007-06-05 22:23:38Z giles $ */
 
14
/* $Id: gsclipsr.c 8250 2007-09-25 13:31:24Z giles $ */
15
15
/* clipsave/cliprestore */
16
16
#include "gx.h"
17
17
#include "gserrors.h"
26
26
private_st_clip_stack();
27
27
 
28
28
/*
29
 
 * When we free a clip stack entry, free the associated clip path,
30
 
 * and iterate down the list.  We do this iteratively so that we don't
31
 
 * take a level of recursion for each node on the list.
 
29
 * When we free a clip stack entry and the associated clip path.
32
30
 */
33
 
private void
 
31
static void
34
32
rc_free_clip_stack(gs_memory_t * mem, void *vstack, client_name_t cname)
35
33
{
36
34
    gx_clip_stack_t *stack = (gx_clip_stack_t *)vstack;
37
 
    gx_clip_stack_t *next;
38
 
 
39
 
    do {
40
 
        gx_clip_path *pcpath = stack->clip_path;
41
 
 
42
 
        next = stack->next;
 
35
 
 
36
    if (stack->rc.ref_count <= 1 ) {
 
37
        gx_clip_path *pcpath = stack->clip_path;
 
38
 
43
39
        gs_free_object(stack->rc.memory, stack, cname);
44
40
        gx_cpath_free(pcpath, "rc_free_clip_stack");
45
 
    } while ((stack = next) != 0 && !--(stack->rc.ref_count));
 
41
    }
46
42
}
47
43
 
48
44
/* clipsave */