1 #include <stdlib.h> 2 #include <string.h> 3 #include "shadowdive/taglist.h" 4 #include "shadowdive/error.h" 5 sd_tag_info(const char * search_tag,int * req_param,const char ** tag,const char ** desc)6int sd_tag_info(const char* search_tag, int *req_param, const char **tag, const char **desc) { 7 for(int i = 0; i < sd_taglist_size; i++) { 8 if(strcmp(search_tag, sd_taglist[i].tag) == 0) { 9 if(req_param != NULL) 10 *req_param = sd_taglist[i].has_param; 11 if(tag != NULL) 12 *tag = sd_taglist[i].tag; 13 if(desc != NULL) 14 *desc = sd_taglist[i].description; 15 return SD_SUCCESS; 16 } 17 } 18 return SD_INVALID_INPUT; 19 } 20