prompt_get(): * Retrieve the prompt printing function */
| 178 | * Retrieve the prompt printing function |
| 179 | */ |
| 180 | protected int |
| 181 | prompt_get(EditLine *el, el_pfunc_t *prf, Char *c, int op) |
| 182 | { |
| 183 | el_prompt_t *p; |
| 184 | |
| 185 | if (prf == NULL) |
| 186 | return -1; |
| 187 | |
| 188 | if (op == EL_PROMPT) |
| 189 | p = &el->el_prompt; |
| 190 | else |
| 191 | p = &el->el_rprompt; |
| 192 | |
| 193 | if (prf) |
| 194 | *prf = p->p_func; |
| 195 | if (c) |
| 196 | *c = p->p_ignore; |
| 197 | |
| 198 | return 0; |
| 199 | } |
no outgoing calls
no test coverage detected