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/

