MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / node__put

Function node__put

extern/editline/src/keymacro.c:428–454  ·  view source on GitHub ↗

node__put(): * Puts a tree of nodes onto free list using free(3). */

Source from the content-addressed store, hash-verified

426 * Puts a tree of nodes onto free list using free(3).
427 */
428private void
429node__put(EditLine *el, keymacro_node_t *ptr)
430{
431 if (ptr == NULL)
432 return;
433
434 if (ptr->next != NULL) {
435 node__put(el, ptr->next);
436 ptr->next = NULL;
437 }
438 node__put(el, ptr->sibling);
439
440 switch (ptr->type) {
441 case XK_CMD:
442 case XK_NOD:
443 break;
444 case XK_EXE:
445 case XK_STR:
446 if (ptr->val.str != NULL)
447 el_free(ptr->val.str);
448 break;
449 default:
450 EL_ABORT((el->el_errfile, "Bad XK_ type %d\n", ptr->type));
451 break;
452 }
453 el_free(ptr);
454}
455
456
457/* node__get():

Callers 3

keymacro_resetFunction · 0.85
node__tryFunction · 0.85
node__deleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected