MCPcopy Create free account
hub / github.com/OpenPrinting/cups / copy_stack

Function copy_stack

cups/raster-interpret.c:714–742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

712 */
713
714static int /* O - 0 on success, -1 on error */
715copy_stack(_cups_ps_stack_t *st, /* I - Stack */
716 int c) /* I - Number of objects to copy */
717{
718 int n; /* Index */
719
720
721 if (c < 0)
722 return (-1);
723 else if (c == 0)
724 return (0);
725
726 if ((n = st->num_objs - c) < 0)
727 return (-1);
728
729 while (c > 0)
730 {
731 _cups_ps_obj_t temp; /* Temporary copy of object */
732
733 temp = st->objs[n];
734 if (!push_stack(st, &temp))
735 return (-1);
736
737 n ++;
738 c --;
739 }
740
741 return (0);
742}
743
744
745/*

Callers 1

_cupsRasterExecPSFunction · 0.85

Calls 1

push_stackFunction · 0.85

Tested by

no test coverage detected