| 892 | } |
| 893 | |
| 894 | static p_ply_element ply_find_element(p_ply ply, const char *name) { |
| 895 | p_ply_element element; |
| 896 | int i, nelements; |
| 897 | assert(ply && name); |
| 898 | element = ply->element; |
| 899 | nelements = ply->nelements; |
| 900 | assert(element || nelements == 0); |
| 901 | assert(!element || nelements > 0); |
| 902 | for (i = 0; i < nelements; i++) |
| 903 | if (!strcmp(element[i].name, name)) return &element[i]; |
| 904 | return NULL; |
| 905 | } |
| 906 | |
| 907 | static p_ply_property ply_find_property(p_ply_element element, |
| 908 | const char *name) { |