[CODE] hedit v2

From: Randell L. Hodges (rhodges@san.rr.com)
Date: 02/24/00


A couple comments and a question regarding the oasis style hedit available
in the circle contrib/olc directory.  While tracking down why the mud was
crashing when saving internally entires (eventually moving to the list
archives to find the answer) I found something that appears to have been
overlooked.

 if (rnum > 0) {
        free_help(help_table + rnum);
        help_table[rnum] = *(OLC_HELP(d));
 } else {   /* Entry doesn't exist, hafta add it. */
       CREATE(new_help_table, struct help_index_element, top_of_helpt + 2);
  /*
  * Insert new entry at the top - why not?
  */
  new_help_table[0] = *(OLC_HELP(d));

If you create a help topic and then go back to edit it, it will continue to
CREATE since its rnum is 0.  I changed it to if (rnum > -1) and everything
seems fine.

I do notice one problem, which I think affects the stock hedit code.  When I
hedit save then reload xhelp, an extra blank line is added to the entry of
every help topic.  It continues to add those lines no matter what.

I believe the problem is in the load_help function

while (*line != '#') {
   strcat(entry, strcat(line, "\r\n"));
   get_one_line(fl, line);
  }

however, as I am still learning I am no certain this is the problem, and if
it is, how I would go about fixing it.

Insights or pointers to the location of the fix (if I overlooked the exact
spot in the archives) would be greatly appreciated.


Randell H.


     +------------------------------------------------------------+
     | 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