| 547 | } |
| 548 | |
| 549 | int ply_add_comment(p_ply ply, const char *comment) { |
| 550 | char *new_comment = NULL; |
| 551 | assert(ply && comment && strlen(comment) < LINESIZE); |
| 552 | if (!comment || strlen(comment) >= LINESIZE) { |
| 553 | ply_ferror(ply, "Invalid arguments"); |
| 554 | return 0; |
| 555 | } |
| 556 | new_comment = (char *) ply_grow_array(ply, (void **) &ply->comment, |
| 557 | &ply->ncomments, LINESIZE); |
| 558 | if (!new_comment) return 0; |
| 559 | strcpy(new_comment, comment); |
| 560 | return 1; |
| 561 | } |
| 562 | |
| 563 | int ply_add_obj_info(p_ply ply, const char *obj_info) { |
| 564 | char *new_obj_info = NULL; |
no test coverage detected