Index: trunk/src_plugins/act_read/act_idpath.c =================================================================== --- trunk/src_plugins/act_read/act_idpath.c (revision 25827) +++ trunk/src_plugins/act_read/act_idpath.c (revision 25828) @@ -94,3 +94,31 @@ return -1; } + +static const char pcb_acts_IDP[] = "IDP([print|free], idpath)\n"; +static const char pcb_acth_IDP[] = "Basic idpath manipulation."; +static fgw_error_t pcb_act_IDP(fgw_arg_t *res, int argc, fgw_arg_t *argv) +{ + const char *cmd; + pcb_idpath_t *idp; + + PCB_ACT_CONVARG(1, FGW_STR, IDP, cmd = argv[1].val.str); + PCB_ACT_CONVARG(2, FGW_IDPATH, IDPList, idp = fgw_idpath(&argv[2])); + if ((idp == NULL) || !fgw_ptr_in_domain(&pcb_fgw, &argv[2], PCB_PTR_DOMAIN_IDPATH)) + return FGW_ERR_PTR_DOMAIN; + + + switch(act_read_keywords_sphash(cmd)) { + case act_read_keywords_free: + pcb_idpath_list_remove(idp); + fgw_ptr_unreg(&pcb_fgw, &argv[2], PCB_PTR_DOMAIN_IDPATH); + free(idp); + PCB_ACT_IRES(0); + return 0; + + case act_read_keywords_print: + break; + } + + return -1; +} Index: trunk/src_plugins/act_read/act_read.c =================================================================== --- trunk/src_plugins/act_read/act_read.c (revision 25827) +++ trunk/src_plugins/act_read/act_read.c (revision 25828) @@ -81,7 +81,8 @@ pcb_action_t act_read_action_list[] = { {"GetValue", pcb_act_GetValue, pcb_acth_GetValue, pcb_acts_GetValue}, - {"IDPList", pcb_act_IDPList, pcb_acth_IDPList, pcb_acts_IDPList} + {"IDPList", pcb_act_IDPList, pcb_acth_IDPList, pcb_acts_IDPList}, + {"IDP", pcb_act_IDP, pcb_acth_IDP, pcb_acts_IDP} }; static const char *act_read_cookie = "act_read";