[DGD]hmm.. this seems to not be goin through...

Neil McBride neil at ekit-inc.com
Wed Apr 26 00:56:03 CEST 2000


BladeDarkmour at aol.com wrote:
> 
> i've sent this twice allready in as many days (this makes third).. lets try
> again.
> 
> Allo peeps.. Yet another newbish question from me.
> Ok, I'm trying to set it up so that I can type "say `ryadda yadda" and that
> would output, assuming the recipient is capable of ansi colors, yadda yadda
> in dark red.  the actual C code to do this for the various ` codes is
> simple... just manipulation of a char*, but when I try to put this into the
> driver, it either a) segfaults, or b)returns garbage anytime I use an escape
> code.  I've tried doing this 3 diff ways... one putting it in conn_write in
> connect.c, b) comm_write in comm.c, and c) making a seperate function,
> parse_color(char* txt, int length), which i tried to use in the above
> functions... none of hte ways worked.  I've fixed the line in comm_write so
> that itll let out the ansi escape code, (adding && *p != ESC and defining
> ESC...).  I'll include the code to parse the color below. *Grumbles to
> himself about feelin like a dunce*  Think you people could take a look and
> offer a few suggestions?

If I understand what you're trying to do, I think I've already done
this, but I used a slightly different approach.  Rather than modify the
driver, I added a section of code into the relevant function of the auto
object (receive_message I think - it's been a while since I looked at
it)  My 'trigger' was .%color|string.%  where color is something like
'blue', 'blue+bold', 'blue+blink' and string is the text that should be
displayed in the appropriate color.  It seems to work well, although
I've done no performance tests on it so far.  I can provide the code if
you're interested in doing it from within the auto object.

Cheers,

Neil.

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list