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

Function push_stack

cups/raster-interpret.c:935–962  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

933 */
934
935static _cups_ps_obj_t * /* O - New object */
936push_stack(_cups_ps_stack_t *st, /* I - Stack */
937 _cups_ps_obj_t *obj) /* I - Object */
938{
939 _cups_ps_obj_t *temp; /* New object */
940
941
942 if (st->num_objs >= st->alloc_objs)
943 {
944
945
946 st->alloc_objs += 32;
947
948 if ((temp = realloc(st->objs, (size_t)st->alloc_objs *
949 sizeof(_cups_ps_obj_t))) == NULL)
950 return (NULL);
951
952 st->objs = temp;
953 memset(temp + st->num_objs, 0, 32 * sizeof(_cups_ps_obj_t));
954 }
955
956 temp = st->objs + st->num_objs;
957 st->num_objs ++;
958
959 memcpy(temp, obj, sizeof(_cups_ps_obj_t));
960
961 return (temp);
962}
963
964
965/*

Callers 3

copy_stackFunction · 0.85
index_stackFunction · 0.85
scan_psFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected