Re: send_to_charf, Take 2

From: George Greer (greerga@circlemud.org)
Date: 07/11/01


On Wed, 11 Jul 2001, Daniel A. Koepke wrote:

>On Wed, 11 Jul 2001, George Greer wrote:
>
>> As much as I'd like to, none of the suggestions have been clearly
>> good. Daniel is close.
>
>Harumph.  Oh, wait, I wasn't really for changing it, anyway...

Because of your lack of creativity, more buf[] usages will live on,
festering in the code, secretly building their army, and creating ruin in
their wake of conquest some day when we least expect it.

You should be ashamed. :P

>> I'll leave the existing act() calls alone and only work with the
>> send_to_char() and mudlog() calls, which I'll probably swap the
>> arguments on.  I'm 60/40 for swapping at the moment.
>
>Double, Double, toil and trouble;
>args swap and tempers bubble.
>Developers two ashore,
>but mind you this, well before:
>Do this true and do this right,
>lest you face the lasting fright;
>In time shall they all adore
>The great Stream EDit-or.

Or Perl, but that's probably not so easy to rhyme.

>In other words: I'm okay with it, but if you're going to do the swap,
>include a sed script so that people can convert their existing uses of
>send_to_char() and mudlog() which are probably in abundance.  Otherwise,
>people -will- be angry.

perl -i -pe '
  s/send_to_char(\s*)\((\s*)(.+)(\s*),(\s*)(.+)(\s*)\)
  /send_to_char$1($2$6$4,$5$3$7)/xg;' *.c

That should take care of:
  send_to_char("Foo", ch);
  send_to_char ( "foo", ch );
and everything in between.

We already have enough gripes about the zone changes you won't even notice
unless you look. :)

--
George Greer
greerga@circlemud.org

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST