X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=eFfKJ3Zx+PKzl4ubYrP7on9UErnDNV6aTYqQkP/v45tZVzNNoEh0byCFo1Bc+S5dmMGTJr241hvqpOug5dduFt77wTJtjcfdzso7T7ju0iZbejNqVoh/jK9AWm7YhJJboBWdmPkgUmUxynUYc/GKgTqQNtiR0gkkU/ZYSXZHD5c= Message-ID: <2497d9a2050907160124a508c7@mail.gmail.com> Date: Wed, 7 Sep 2005 19:01:45 -0400 From: Matthew Petricone To: djgpp AT delorie DOT com Subject: Re: Pb with sprintf In-Reply-To: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_26729_25303838.1126134105680" References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk ------=_Part_26729_25303838.1126134105680 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Aye, is this the actuall code that's giving you the problem or just a=20 simplification? On 9/7/05, Joe Wright wrote: >=20 > philippe meynard wrote: > > Hi! All > > > > do you know if the function sprintf used dos call dpmi_int (0x21) or=20 > return > > the processor to the real mode or used malloc ? > > Because I use LWP (multitasking library) and I have a crash on this=20 > function > > sprintf ! > > I used sprintf like this : > > > > char chaf[100]; > > sprintf(chaf,"%d\n",100); > > > > > > Thanks. > > > > > > > #include > #include >=20 > int main(void) { > char chaf[100]; > sprintf(chaf, "%d", 100); > printf("chaf length is %d and looks like %s\n", > strlen(chaf), chaf); > return 0; > } >=20 > Can't guess your problem. The above code works fine here. > -- > Joe Wright > "Everything should be made as simple as possible, but not simpler." > --- Albert Einstein --- > ------=_Part_26729_25303838.1126134105680 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Aye, is this the actuall code that's giving you the problem or just a simpl= ification?

On 9/7/05, Joe Wright <= jwright AT comcast DOT net > wrote:
philippe meynard wrote:
> Hi! All
>
> do you know if= the function sprintf used dos call dpmi_int (0x21) or return
> the processor to the real mode or used malloc ?
> Because I = use LWP (multitasking library) and I have a crash on this function
> = sprintf !
> I used sprintf like this :
>
> char chaf[100]= ;
> sprintf(chaf,"%d\n",100);
>
>
> Thanks= .
>
>
>
#include <stdio.h>
#include <strin= g.h>

int main(void) {
    char chaf[100];<= br>    sprintf(chaf, "%d", 100);
    printf("chaf length is %d and looks like %= s\n",
       strlen(chaf), chaf);
=     return 0;
}

Can't guess your problem. The= above code works fine here.
--
Joe Wright
"Everything should= be made as simple as possible, but not simpler."
            = ;         --- Albert Einstein ---

------=_Part_26729_25303838.1126134105680--