www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/22/23:24:56

Date: Thu, 21 Jan 1999 19:07:01 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Norman D. Megill" <ndm AT shore DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: djgpp loses characters when pasting to DOS
In-Reply-To: <784ho5$1hv@northshore.shore.net>
Message-ID: <Pine.SUN.3.91.990121185308.19490B-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On 20 Jan 1999, Norman D. Megill wrote:

> Help!  Cut-and-paste from a text editor into DOS is losing characters
> when used with djgpp programs.  This does not happen with the lcc
> compiler, nor with standard DOS utilities. 

I find the assumption that DJGPP has something to do with this extremely 
hard to believe.  The cut-and-paste operation between DOS boxes or 
between Windows programs and a DOS box has nothing to do with DJGPP, it 
is entirely internal to Windows clipboard feature.  Moreover, DJGPP 
doesn't change anything in the way the DOS box operates.  The example you 
describe doesn't even run the DJGPP program before you paste, so DJGPP 
doesn't have a chance to do anything evil to Windows.

FWIW, I'm using the clipboard to cut and paste to and from DOS boxes in
general and DJGPP programs in particular all the time (the editor I use is
compiled with DJGPP and supports Windows clipboard directly), and I have
never seen any lossage like what you describe.  The only problem I have
seen is that, when you paste, Windows usually *adds* some extra characters
after the end of the copied text.  But this happens with *every* text I
paste, and not only to DJGPP programs (I also suspect that this Windows
bug is unique the Hebrew version of Windows, which has to cope with
right-to-left direction, but doesn't do it very well). 

> By the way something seems to have degraded over time on my machine
> where this bug used to not happen very often, then more frequently, and
> now all the time.  Wierd.

This is just another evidence that DJGPP has nothing to do with this.  
Its bugs don't ``degrade with time''.  You need to look for the reason(s) 
elsewhere.

> The same program, compiled with lcc, works fine with the
> cut-and-paste test (fast pasting turned on or off):

Well, how about the following theory: maybe Windows itself disrupts its 
clipboard operation when it launches a DPMI program?  So when the first 
line invokes bug.exe compiled with DJGPP, Windows somehow screws up its 
clipboard and sends part of the following text to the great void?

Even with this crazy theory (which should be taken up with Redmond 
people), somebody else should confirm that they see the same phenomenon 
on their machine.  Anybody?

> (I would use lcc but unfortunately it is too slow for my
> CPU-intensive application.)  Thanks for any help!

What's the *real* problem you are trying to solve?  Do you really need to 
invoke programs by pasting text into a DOS box?  If not, maybe this 
lossage, whatever causes it, is utmostly irrelevant for the real problem?

- Raw text -


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