void sal_remove_supported_tag(Sal *ctx, const char* tag){ bctbx_list_t *elem=bctbx_list_find_custom(ctx->supported_tags,(bctbx_compare_func)strcasecmp,tag); if (elem){ ms_free(elem->data); ctx->supported_tags=bctbx_list_remove_link(ctx->supported_tags,elem); make_supported_header(ctx); } }
void sal_add_supported_tag(Sal *ctx, const char* tag){ bctbx_list_t *elem=bctbx_list_find_custom(ctx->supported_tags,(bctbx_compare_func)strcasecmp,tag); if (!elem){ ctx->supported_tags=bctbx_list_append(ctx->supported_tags,ms_strdup(tag)); make_supported_header(ctx); } }
void sal_remove_supported_tag(Sal *ctx, const char* tag){ MSList *elem=ms_list_find_custom(ctx->supported_tags,(MSCompareFunc)strcasecmp,tag); if (elem){ ms_free(elem->data); ctx->supported_tags=ms_list_remove_link(ctx->supported_tags,elem); make_supported_header(ctx); } }
void sal_add_supported_tag(Sal *ctx, const char* tag){ MSList *elem=ms_list_find_custom(ctx->supported_tags,(MSCompareFunc)strcasecmp,tag); if (!elem){ ctx->supported_tags=ms_list_append(ctx->supported_tags,ms_strdup(tag)); make_supported_header(ctx); } }
void sal_set_supported_tags(Sal *ctx, const char* tags){ ctx->supported_tags=bctbx_list_free_with_data(ctx->supported_tags,ms_free); if (tags){ char *iter; char *buffer=ms_strdup(tags); char *tag; char *context=NULL; iter=buffer; while((tag=strtok_r(iter,", ",&context))!=NULL){ iter=NULL; ctx->supported_tags=bctbx_list_append(ctx->supported_tags,ms_strdup(tag)); } ms_free(buffer); } make_supported_header(ctx); }