MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / ply_add_comment

Function ply_add_comment

src/IO/rply.c:549–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549int 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
563int ply_add_obj_info(p_ply ply, const char *obj_info) {
564 char *new_obj_info = NULL;

Callers 2

ply_read_header_commentFunction · 0.85
write_meshMethod · 0.85

Calls 2

ply_ferrorFunction · 0.85
ply_grow_arrayFunction · 0.85

Tested by

no test coverage detected