| 10831 | } |
| 10832 | |
| 10833 | GMT_LOCAL void gmtplot_copy_ps (struct GMT_CTRL *GMT, struct GMT_POSTSCRIPT *P_copy, struct GMT_POSTSCRIPT *P_obj) { |
| 10834 | /* Just duplicate from P_obj into P_copy */ |
| 10835 | struct GMT_POSTSCRIPT_HIDDEN *PH = gmt_get_P_hidden (P_copy); |
| 10836 | if (P_obj->n_bytes > PH->n_alloc) P_copy->data = gmt_M_memory (GMT, P_copy->data, P_obj->n_bytes, char); |
| 10837 | gmt_M_memcpy (P_copy->data, P_obj->data, P_obj->n_bytes, char); |
| 10838 | gmt_M_memcpy (P_copy->hidden, P_obj->hidden, 1, struct GMT_POSTSCRIPT_HIDDEN); |
| 10839 | P_copy->mode = P_obj->mode; |
| 10840 | PH->n_alloc = P_copy->n_bytes = P_obj->n_bytes; |
| 10841 | PH->alloc_mode = GMT_ALLOC_INTERNALLY; /* So GMT can free the data array */ |
| 10842 | } |
| 10843 | |
| 10844 | /*! . */ |
| 10845 | struct GMT_POSTSCRIPT * gmtlib_duplicate_ps (struct GMT_CTRL *GMT, struct GMT_POSTSCRIPT *P_from, unsigned int mode) { |
no test coverage detected