Re: [ Idea ] actf() ?!?!

From: bruce (s3038268@TITANIC.MPCE.MQ.EDU.AU)
Date: 10/15/97

On Wed, 8 Oct 1997, Daniel Koepke wrote:

sorry about the late reply, i've been out of town for the last week. if
this has already been replied to, sorry again.

comments follow.

> On Tue, 7 Oct 1997, David Klasinc wrote:
> -+Banzai!
> -+
> -+ Would it make sense? That is writing actf()? :)
> No, it'd not make sense and it'd be difficult.  You see, for an
> "xxxf()" function to work, the format string has to be last.
> That means,
>   act(char *, bool, char_data *, void *, void *, int);
> would have to be changed to
>   actf(bool, char_data *, void *, void *, int, char *, ...);
> which would be confusing when you're using act() and actf() in the
> same area of code.  And then, of course, there's the fact that act()
i think the original message was going on the premise that theyed already
done the send_to_XXXf() functions (george's patch). in that case it does
make sense for consistency.

> already accepts one text parameter in the middle, if you actually
> need it (and it's very rarely needed).  Try:
>   act("$n $T $N.", FALSE, ch, verb_str, victim, TO_CHAR);
yes, but you can't put in an integer that way, or multiple

> I think that works, and there's very few cases when you'll need the
> printf behaviour, and in those rare cases it'd make more sense to
> use sprintf() than to write a new actf() function.
when i imped actf() and send_to_XXXf() (before george's patch, but based
on his log() patch), i found several places in the code where actf()
could be used.

also, i wanted to get rid of the global buffers and these functions
helped greatly.

it's a matter of personal preference i suppose. i no longer use the
original act() or send_to_XXX() funcs.

> --
> Daniel Koepke -:- -:-  [Shadowlord/Nether]
> Think.
                * bruce -    *
                * *

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST