I guess I don't quite understand--it seems to be working okay as-is, do you
think I ought to change it to be *ch?

Relatedly, I've noticed that format_string was made for room descripts (duh)
and strips out any blank lines.  I'm trying to modify it so if the buffer
looks like \r\n (AKA a new line-- right?) it'll shove out \r\n instead of
making it into ' '.  I think some people like paragraph breaks in their room
descrips anywho.  Actually, in retrospect, I guess this won't work.. I need
to make it \r\n\n.. or something.. *boggles*  What's a blank line look like?
\r\n\r\n?

Ah, how much easier it would be if it was HTML.

Thanks again,

Jeremy Hill

----- Original Message -----
From: "Edwin Groothuis" <[EMAIL PROTECTED]>
To: "Jeremy Hill" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Monday, February 25, 2002 12:20 AM
Subject: Re: Line formatting query


> On Mon, Feb 25, 2002 at 12:11:32AM -0600, Jeremy Hill wrote:
> > Greetings and salutations,
> >   First time posting; have a quick question for you. I use Erwin's note
> > board system.  I was going to make a note formatter
> > for it, but then I noticed that OLC had a formatter built in, called
> > format_string:
> > char *format_string (char *oldstring)
> >
> > I figured I could kind of make use of this and use that instead of
making my
> > own line formatter, so this is what I did in
> > void handle_con_note_finish (part of board.c):
> >
> > case 'o': /*format note*/
> >     ch->pcdata->in_progress->text = format_string
> > (ch->pcdata->in_progress->text);
> >     write_to_buffer (d,"Note formatted.\n\r",0);
> >     break;
> >
> > Now, here's my question-- some of the other calls to format_string use
> > pointers, like
> > *ch->desc->pString = format_string (*ch->desc->pString);
> > while others do not, like
> > pRoom->description = format_string (pRoom->description);
>
> if you check the defintion of the description field in the roomindexdata
> struct, you see that it's a char *, so it is a pointer.
> What you also can see in the definition of the pString field in the
> descriptordata is that it's a char **, so a pointer to a pointer.
>
> So as long as the parameter for the format_string is a char *,
> everything will go okay. But if it's different? Ooooh my god :-)
>
> Edwin
>
> --
> Edwin Groothuis   |              Personal website: http://www.MavEtJu.org
> [EMAIL PROTECTED] |           Interested in MUDs? Visit Fatal Dimensions:
> ------------------+                       http://www.FatalDimensions.org/


Reply via email to