Re: proc color problem

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 07/22/00


Emil Nilimaa wrote:
>
> Ok,
>
> was thinking if i should move the proc color from
> process output (where it sends stuff to the descriptor),
> to write_to_output instead.
>
> However, the char in write_to_output is const char, so
> i cant proc color on it.
> and write to output is used all over the mud, in like
> send_to_char, send_to_room etc.
> Would need to remove const from it all over the mud.

Actually, the const is not a problem here.  write_to_output copies the
text from the 1st arg to the output buffer of the descriptor.  All that
you really need to do is copy the string to a new buffer which you can
pass to proc_color.  Since the new buffer won't inherit the const of the
one passed to the function you can mess with it all you want.

Regards, Peter


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT