| 113 | } |
| 114 | |
| 115 | void remove_output_function(agent* thisAgent, const char* name) |
| 116 | { |
| 117 | soar_callback* cb; |
| 118 | output_link* ol; |
| 119 | |
| 120 | /* Remove indexing structures ... */ |
| 121 | |
| 122 | cb = soar_exists_callback_id(thisAgent, OUTPUT_PHASE_CALLBACK, name); |
| 123 | if (!cb) |
| 124 | { |
| 125 | return; |
| 126 | } |
| 127 | |
| 128 | for (ol = thisAgent->existing_output_links; ol != NIL; ol = ol->next) |
| 129 | { |
| 130 | if (ol->cb == cb) |
| 131 | { |
| 132 | /* Remove ol entry */ |
| 133 | ol->link_wme->output_link = NULL; |
| 134 | wme_remove_ref(thisAgent, ol->link_wme); |
| 135 | remove_from_dll(thisAgent->existing_output_links, ol, next, prev); |
| 136 | free_with_pool(&(thisAgent->output_link_pool), ol); |
| 137 | break; |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | soar_remove_callback(thisAgent, OUTPUT_PHASE_CALLBACK, name); |
| 142 | } |
| 143 | |
| 144 | /* ==================================================================== |
| 145 | Input Routines |
nothing calls this directly
no test coverage detected