Action Editor

From: Silk (silk@ici.net)
Date: 12/24/98


Just finally got the help editor working and went back to trying to get
the action editor to work. Right at the moment it seems like it is almost
there: I can enter the menu, create or edit a social, and exit, at which
time it reparses the command list to include the new social.

The problem is, for example, if I add a social called khand. I go through
the menu and create the social and save it to memory. Afterwards I go and
use the socials command to display the list and a snipped version is
below:

grovel     growl       kiss       kudos      laugh      lick       love

lyn        massage    moan       muaha      nibble     nod        noda
nods       nodw       nudge      nuzzle     pat        peer       pinch
point      poke       ponder     pout       pray       puke       punch

grumble hiccup hop howl hug
innocent      @     @

Now PINE isnt letting me cut and paste exactly right because where the
social is there are unprintable characters. Everything is actually in
order, just that what should be khand is now about 16 trashed and
unprintable characters.

This leads me to believe that something in the struct is being trashed at
some point. Everything is fine during the menu edit, which leads me to
believe it has to do with these lines:

      CREATE(new_soc_mess_list, struct social_messg, top_of_socialt + 2);
      for (i = 0; i <= top_of_socialt; i++)
        new_soc_mess_list[i] = soc_mess_list[i];
--->  new_soc_mess_list[++top_of_socialt] = *OLC_ACTION(d);
      free(soc_mess_list);
      soc_mess_list = new_soc_mess_list;
      create_command_list();
      log("Recreated command list-- AEDIT code.");
      sort_commands();
      log("Sorted commands.");

or the set right below that in the other if/then/else construct.
Specifically the line I highlighted there (these are lines 123-133 in my
copy, I did add the log statements), which is line 127 (aedit.c).

Any recommendations as to how to go about testing this theory? I'm getting
better but dealing with pointers and memory allocations for things like
linked lists is _not_ something I am really comfortable with nor as good
at as I would like.

--StormeRider--


     +------------------------------------------------------------+
     | 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 : 12/15/00 PST