🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.lang.c
Article #15373

Re: memcpy et char

#15373
From: Emmanuel Delahaye
Date: Sat, 24 Sep 2005 08:25
20 lines
1618 bytes
Targeur fou wrote on 23/09/05 :
>>>         char * tmp = malloc(lg+1);
>> 
>> Ca fout la trouille!
>
> Quoi �a ? Le fait d'utiliser un malloc ? 

Non, la suite qui en d�coule qui est hyper tordue...

Il n'y a pas besoin de cr�er une chaine locale pour remplacer un 
caract�re dans une chaine modifiable.


-- 
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

"There are 10 types of people in the world today;
those that understand binary, and those that dont."
Technical Details
Message-ID: <mn.c2717d599bec7fda.15512@YOURBRAnoos.fr>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!news.wiretrip.org!proxad.net!infeed-3.proxad.net!news18-e.free.fr!not-for-mail
References: <4333e995$0$17469$626a14ce@news.free.fr> <1127484266.226712.264720@g49g2000cwa.googlegroups.com> <mn.bc267d590261c670.15512@YOURBRAnoos.fr> <1127507318.886886.310360@f14g2000cwb.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f9822,366ad66ae342f8da
X-Google-Attributes: gidf9822,public
X-Google-Language: ENGLISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!news.wiretrip.org!proxad.net!infeed-3.proxad.net!news18-e.free.fr!not-for-mail
Subject: Re: memcpy et char
From: "Emmanuel Delahaye" <emdel@YOURBRAnoos.fr>
References: <4333e995$0$17469$626a14ce@news.free.fr> <1127484266.226712.264720@g49g2000cwa.googlegroups.com> <mn.bc267d590261c670.15512@YOURBRAnoos.fr> <1127507318.886886.310360@f14g2000cwb.googlegroups.com>
Newsgroups: fr.comp.lang.c
Message-ID: <mn.c2717d599bec7fda.15512@YOURBRAnoos.fr>
X-Newsreader: MesNews/1.04.00.00-fr
Date: Sat, 24 Sep 2005 10:25:32 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 22
Organization: Guest of ProXad - France
NNTP-Posting-Date: 24 Sep 2005 10:25:33 MEST
NNTP-Posting-Host: 81.65.109.78
X-Trace: 1127550333 news18-e.free.fr 4329 81.65.109.78:18403
X-Complaints-To: abuse@proxad.net