Builder/Builder/Common/plyfile.c
/******************************************************************************
Specify a comment that will be written in the header.

Entry:
  plyfile - file identifier
  comment - the comment to be written
******************************************************************************/
Specify a comment that will be written in the header.
Entry:
plyfile - file identifier
comment - the comment to be written
Specify a comment that will be written in the header . Entry : plyfile - file identifier comment - the comment to be written
void ply_put_comment(PlyFile *plyfile, char *comment)
{
  if (plyfile->num_comments == 0)
    plyfile->comments = (char **) myalloc (sizeof (char *));
  else
    plyfile->comments = (char **) realloc (plyfile->comments,
                         sizeof (char *) * (plyfile->num_comments + 1));
  plyfile->comments[plyfile->num_comments] = _strdup (comment);
  plyfile->num_comments++;
}
void ply_put_comment ( PlyFile * plyfile , char * comment ) { if ( plyfile -> num_comments == 0 ) plyfile -> comments = ( char * * ) myalloc ( sizeof ( char * ) ) ; else plyfile -> comments = ( char * * ) realloc ( plyfile -> comments , sizeof ( char * ) * ( plyfile -> num_comments + 1 ) ) ; plyfile -> comments [ plyfile -> num_comments ] = _strdup ( comment ) ; plyfile -> num_comments ++ ; }
Specify a comment that will be written in the header.
Specify a comment that will be written in the header .
/* (re)allocate space for new comment */ /* add comment to list */