delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2005/09/06/07:30:32

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <431d7d5a$0$177$cc7c7865@news.luth.se>
From: Martin Str|mberg <ams AT speedy DOT ludd DOT ltu DOT se>
Subject: Re: error with sprintf
Newsgroups: comp.os.msdos.djgpp
References: <dfjtbh$kg1$1 AT s1 DOT news DOT oleane DOT net>
User-Agent: tin/1.4.6-20020816 ("Aerials") (UNIX) (NetBSD/1.6Q (alpha))
Date: 06 Sep 2005 11:28:26 GMT
Lines: 30
NNTP-Posting-Host: speedy.ludd.ltu.se
X-Trace: 1126006106 news.luth.se 177 130.240.16.13
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

philippe meynard <philippe DOT meynard AT vendeeconcept DOT com> wrote:
> do you know if the function sprintf used dos call dpmi_int (0x21) or return
> the processor to the real mode ?

1. You can check yourself (get dlsrc*.zip).

2. I haven't checked (see 1) but I would be very surprised if it
needed to call dpmi_int() as the operation is purely an updating of
memory.

3. If the processor would be returned to real mode, it would have to
be through a call to dpmi_int() (at least DJGPP would use that). No
"or" about it.

> Because I use LWP (multitasking library) and I have a crash on this function
> sprintf !
> I use sprintf like this :

> char ch[100];
> sprintf(chaf,"%d\n",100);

4. chaf undeclared.

5. Assuming you meant ch, there shouldn't be any reason for sprintf()
to bomb on that line.


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019