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

Function rl_set_prompt

extern/editline/src/readline.c:267–286  ·  view source on GitHub ↗

* Set the prompt */

Source from the content-addressed store, hash-verified

265 * Set the prompt
266 */
267int
268rl_set_prompt(const char *prompt)
269{
270 char *p;
271
272 if (!prompt)
273 prompt = "";
274 if (rl_prompt != NULL && strcmp(rl_prompt, prompt) == 0)
275 return 0;
276 if (rl_prompt)
277 el_free(rl_prompt);
278 rl_prompt = strdup(prompt);
279 if (rl_prompt == NULL)
280 return -1;
281
282 while ((p = strchr(rl_prompt, RL_PROMPT_END_IGNORE)) != NULL)
283 *p = RL_PROMPT_START_IGNORE;
284
285 return 0;
286}
287
288/*
289 * initialize rl compat stuff

Callers 3

rl_initializeFunction · 0.85
readlineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected