Nate Winters wrote:
>
> I have the patch working, except is adds an extra line of text at the
> end of every help entry after you edit an entry and then reload the help
> files (by either reload xhelp or rebooting). For example, when I edit a new
> or existing entry by adding a line to it and save, everything is fine, it
> looks perfect. Until I reload xhelp or reboot. Then an extra line is there.
> Each time I do this another line is added. In hedit.c to remove empty lines
> it used strip_string. With OasisOLC 2.0 it is strip_cr. I have tried both,
> and neither is working. This is the code:
This is a known bug with it, and it's fixable, just need to spend some
time debugging it (but I'm not that evil, I think it's in the archives
but they're down ;)
The problem is that help->entry already has a \n in it, so every save
just adds a new one...
>
> /*
> * Remove the '\r\n' sequences from description.
> */
> strcpy(buf1, help->entry ? help->entry : "Empty");
Change the above line to:
strcpy(buf1, help->entry ? help->entry : "Empty\n");
(this makes sure that new entries have a sane help message...
> strip_cr(buf1);
>
> /*
> * Forget making a buffer, lets just write the thing now.
> */
> fprintf(fp, "%s\n%s\n#%d\n",
the above format string should be:
"%s\n%s#%d\n"
That makes sure that you don't keep adding a \n every time to the actual
help text (easy to see that it adda a \n on every save, that's
reloaded, and then saves another one into the text, and keeps going...
> help->keywords ? help->keywords : "UNDEFINED", buf1, help->min_level);
> }
Second prob:
> In file included from hedit.c:14:
> oasis.h:340: warning: parameter names (without types) in function
> declaration
> oasis.h:340: warning: data definition has no type or storage class
>
> oasis.h line 340:
> ACMD(do_oasis);
is #include "interpreter.h" before the oasis.h include? that sets up
the ACMD macro.
Cheers,
Chris
+------------------------------------------------------------+
| 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