Re: [Code] proc_color + pl22/3.1

From: Ronald Fenner (
Date: 02/28/03

On Wednesday, February 26, 2003, at 10:08  PM, Russell Ryan wrote:

> Hey,
>     So I'm changing my code to fix the problem with the new output
> buffer
> system in pl22 and 3.1, and I was wondering if what I'm doing is
> right. I
> don't want to put the proc color in vwrite_to_output, because then a
> code

I submitted a new color system like easy color that used a generic
string replacer believe it ended up under the utilities area and it was
done using the 3.1 code base

> int process_output(...) {

not a good place to put proc_color while it offers a single source
there are other functions that call this function that rely on the
number of characters processed and can foul them up when you return a
larger number or a number that doesn't reflect the how many of the
original characters were written.
When I did the above patch i spent several day looking, examining and
attempting to over come this point after all was said and done i went
with the vwrite functions since nothing that currently called them was
critical on the number returned.

The current design of the output path for a player isn't well designed
to support a single point that all output flows through with out the
calling functions needing to know how much was stored or written for
the character.

However having said all that one could  rewrite one of the lower level
functions like maybe write_to_descriptor to actually handle the parsing
of color codes because then you could keep track as you parse the
string how many characters of the original string you've really written.

However thats not what most of us want,  I bet most of us want a point
we can insert a text filter between all the text being sent to the
character and the buffer or socket and not have to worry about wether
it messes up the function that may have called the function the filter
lives in. The mess up will usually be that text is dropped and never
sent to the character.

Ron Fenner

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/26/03 PDT