Re: Curious question for act.comm.c

From: Artovil (
Date: 09/01/01

At 11:07 2001-09-01 -0400, you wrote:
>Artovil wrote:
> > >In this function, where is buf1 and buf2 comming from? (are they not
> globals
> > >here?) Or am I missing somthing to understand what you're refering to?
> >
> > buf1 and buf2 are coming from the prompt, the player types write paper pen,
> > where paper = buf1, and pen = buf2, and to clarify that inside the function
> > they are set papername = buf1, penname = buf2, and so forth.
> >
>Where are you getting buf1 and buf2 from? The 'argument' is passed to
>ACMD(do_write) not buf1 and buf2, penname and papername are then set to buf1
>and buf2. Directly after it, they are being RESET to the two_arguments.
>Its kinda like doing this:
>   mybuf = buf; /* lets make it equal to something? */
>   one_argument(argument, mybuf); /*lets actually make it equal to what we
> want
>   struct obj_data *paper, *pen = NULL;
>   char *papername, *penname;
>   papername = buf1;
>   penname = buf2;
>   two_arguments(argument, papername, penname);

Well, in a sense they are, aren't they?  They are split into two strings
from the argument.  I am not so well versed in code terms as you might be,
but I was still right in a sense, wasn't I?  I just didn't phrase it
properly.  Well, it makes some funky thing there by assigning papername to
buf1, so I see your point now.  Buf1 is pointless, it might as well just
use papername and penname and skip buf1 and buf2.  My fault for mixing it
up with functions that actually use buf1 and buf2 when splitting with

   | FAQ: |
   | Archives: |

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