DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] RFC on changing cmdline_set_prompt()
@ 2014-10-01 17:27 Wiles, Roger Keith
  0 siblings, 0 replies; only message in thread
From: Wiles, Roger Keith @ 2014-10-01 17:27 UTC (permalink / raw)
  To: <dev@dpdk.org>


I was needing cmdline_set_prompt(struct cmdline * cl, const char * prompt) to be more dynamic with the prompt.

What I would like to be able to do is change the prompt on the fly in my Pktgen-DPDK application. The reason is I have added some limited ANSI color support and would like to remove the color sequence codes when color support is turned off.

I could just call cmdline_set_prompt() again with the new prompt, which would the simplest method.
But what is the fun in that design and being a programmer I was thinking about making it even more complex :-)

I was thinking about adding a function pointer to cmdline_set_prompt(cl, “Foobar>”, myGet_prompt) or replacing cmdline_set_prompt(cl, myGet_prompt); or adding a new set prompt function to add a function callback routine cmdline_set_prompt_callback(cl, myGet_prompt); Where ‘char * myGet_prompt(struct cmdline *cl);’

Comments?

Thanks
++Keith
Keith Wiles, Principal Technologist with CTO office, Wind River mobile 972-213-5533

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-01 17:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-01 17:27 [dpdk-dev] RFC on changing cmdline_set_prompt() Wiles, Roger Keith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).