| 2325 | } |
| 2326 | |
| 2327 | int msUpdateClusterFromString(clusterObj *cluster, char *string) |
| 2328 | { |
| 2329 | if(!cluster || !string) return MS_FAILURE; |
| 2330 | |
| 2331 | msAcquireLock( TLOCK_PARSER ); |
| 2332 | |
| 2333 | msyystate = MS_TOKENIZE_STRING; |
| 2334 | msyystring = string; |
| 2335 | msyylex(); /* sets things up, but doesn't process any tokens */ |
| 2336 | |
| 2337 | msyylineno = 1; /* start at line 1 */ |
| 2338 | |
| 2339 | if(loadCluster(cluster) == -1) { |
| 2340 | msReleaseLock( TLOCK_PARSER ); |
| 2341 | return MS_FAILURE; /* parse error */; |
| 2342 | } |
| 2343 | msReleaseLock( TLOCK_PARSER ); |
| 2344 | |
| 2345 | msyylex_destroy(); |
| 2346 | return MS_SUCCESS; |
| 2347 | } |
| 2348 | |
| 2349 | static void writeCluster(FILE *stream, int indent, clusterObj *cluster) { |
| 2350 |
no test coverage detected