Re: [NEWBIE] Examine X.corpse problem.

From: Juliano Ravasi Ferraz (jferraz@linkway.com.br)
Date: 04/03/00


Dan Merillat wrote:
>
> Juliano Ravasi Ferraz writes:
>
> >   char arg2[MAX_INPUT_LENGTH]; /* at beginning of the function */
> >   strcpy(arg2, arg);
> >   look_at_target(ch, arg2);
> >
> > That is an frustrated attempt to enhance this old idea. Living and
> > learning... Excuse-me for my error, and thanks to all for this warning.
>
> If your libc has it, try strdupa() rather then strdup... it's automatically
> free()'d when your function returns, and is cheaper (cpu-wise) then malloc
> (which strdup() uses).
>
> It's fairly common now, at least in unix.  (most muds are running on
> freebie/linux systems, and they both have it.)

What is your version of libc? I have GNU libc 2.1.1 and it does not have
this func.

Thanks.

,--[ Juliano Ravasi Ferraz, F.R+C ]--------------------.
|   `-[ jferraz@linkway.com.br ]----------------------.|
|                                                      |
| Rayon Eletônica e Informática Ltda - Diretor Técnico |
|    Linkway Internet Provider - Unidade Descalvado    |
`------------------------------------------------------'


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