| 838 | } |
| 839 | |
| 840 | static int ply_read_scalar_property(p_ply ply, p_ply_element element, |
| 841 | p_ply_property property, p_ply_argument argument) { |
| 842 | p_ply_read_cb read_cb = property->read_cb; |
| 843 | p_ply_ihandler *driver = ply->idriver->ihandler; |
| 844 | p_ply_ihandler handler = driver[property->type]; |
| 845 | argument->length = 1; |
| 846 | argument->value_index = 0; |
| 847 | if (!handler(ply, &argument->value)) { |
| 848 | ply_ferror(ply, "Error reading '%s' of '%s' number %d", |
| 849 | property->name, element->name, argument->instance_index); |
| 850 | return 0; |
| 851 | } |
| 852 | if (read_cb && !read_cb(argument)) { |
| 853 | ply_ferror(ply, "Aborted by user"); |
| 854 | return 0; |
| 855 | } |
| 856 | return 1; |
| 857 | } |
| 858 | |
| 859 | static int ply_read_property(p_ply ply, p_ply_element element, |
| 860 | p_ply_property property, p_ply_argument argument) { |
no test coverage detected