| 280 | } |
| 281 | |
| 282 | static int searchContextForTag(mapObj *map, char **ltags, char *tag, char *context, int requires) |
| 283 | { |
| 284 | int i; |
| 285 | |
| 286 | if(!context) return MS_FAILURE; |
| 287 | |
| 288 | /* printf("\tin searchContextForTag, searching %s for %s\n", context, tag); */ |
| 289 | |
| 290 | if(strstr(context, tag) != NULL) return MS_SUCCESS; /* found the tag */ |
| 291 | |
| 292 | /* check referenced layers for the tag too */ |
| 293 | for(i=0; i<map->numlayers; i++) { |
| 294 | if(strstr(context, ltags[i]) != NULL) { /* need to check this layer */ |
| 295 | if(requires == MS_TRUE) { |
| 296 | if(searchContextForTag(map, ltags, tag, GET_LAYER(map, i)->requires, MS_TRUE) == MS_SUCCESS) return MS_SUCCESS; |
| 297 | } else { |
| 298 | if(searchContextForTag(map, ltags, tag, GET_LAYER(map, i)->labelrequires, MS_FALSE) == MS_SUCCESS) return MS_SUCCESS; |
| 299 | } |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | return MS_FAILURE; |
| 304 | } |
| 305 | |
| 306 | /* |
| 307 | ** Function to take a look at all layers with REQUIRES/LABELREQUIRES set to make sure there are no |
no outgoing calls
no test coverage detected