Mail Archives: djgpp/2005/09/07/19:02:15
------=_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 <jwright AT comcast DOT net> 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 <stdio.h>
> #include <string.h>
>=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?<br><br><div><span class=3D"gmail_quote">On 9/7/05, <b class=3D"g=
mail_sendername">Joe Wright</b> <<a href=3D"mailto:jwright AT comcast DOT net">=
jwright AT comcast DOT net
</a>> wrote:</span><blockquote class=3D"gmail_quote" style=3D"border-lef=
t: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1=
ex;">philippe meynard wrote:<br>> Hi! All<br>><br>> do you know if=
the function sprintf used dos call dpmi_int (0x21) or return
<br>> the processor to the real mode or used malloc ?<br>> Because I =
use LWP (multitasking library) and I have a crash on this function<br>> =
sprintf !<br>> I used sprintf like this :<br>><br>> char chaf[100]=
;
<br>> sprintf(chaf,"%d\n",100);<br>><br>><br>> Thanks=
.<br>><br>><br>><br>#include <stdio.h><br>#include <strin=
g.h><br><br>int main(void) {<br> char chaf[100];<=
br> sprintf(chaf, "%d", 100);
<br> printf("chaf length is %d and looks like %=
s\n",<br> strlen(chaf), chaf);<br>=
return 0;<br>}<br><br>Can't guess your problem. The=
above code works fine here.<br>--<br>Joe Wright<br>"Everything should=
be made as simple as possible, but not simpler."
<br>  =
;
--- Albert Einstein ---<br></blockquote></div><br>
------=_Part_26729_25303838.1126134105680--
- Raw text -