delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/20/07:27:57

From: ndm AT shore DOT net (Norman D. Megill)
Newsgroups: comp.os.msdos.djgpp
Subject: djgpp loses characters when pasting to DOS
Organization: Shore.Net; a service of Eco Software, Inc. (info AT shore DOT net)
Lines: 84
Message-ID: <784ho5$1hv@northshore.shore.net>
Date: 20 Jan 1999 07:21:25 -0500
NNTP-Posting-Host: 192.233.85.1
X-Complaints-To: abuse AT shore DOT net
X-Trace: news.shore.net 916834886 192.233.85.1 (Wed, 20 Jan 1999 07:21:26 EDT)
NNTP-Posting-Date: Wed, 20 Jan 1999 07:21:26 EDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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.  It happens even with "fast
pasting" turned off in DOS.  I downloaded the latest djgpp as of 1/20/99
and the bug is still there.

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.

I have Windows 95 on a Gateway 2300 laptop purchased 2/98.  The problem
happens with both:  djdev201.zip/gcc2721b.zip and djdev202.zip/gcc281b.zip.
(BTW how do I find out the version of DOS?  There seems to be no "About.."
button on the DOS window and MS has also removed the "HELP" command...)

Here's my test program bug.c:

  #include <stdlib.h>
  main(int argc, char *argv[])
  {
    printf("DOS cut-and-paste bug test\n");
    return 0;
  }

compiled with

  gcc bug.c -o bug.exe

I put these two lines into a text editor and copied them into
the paste buffer:

  bug  abc def
  bug  abc def

Then I clicked on the paste button in the DOS window (fast pasting
turned off):

  D:\r>bug  abc def
  DOS cut-and-paste bug test

  D:\r>def
  Bad command or file name

  D:\r>

The number of characters lost seems random.  Running the above
again I saw:

  D:\r>bug  abc def
  DOS cut-and-paste bug test

  D:\r>bc def
  Bad command or file name

  D:\r>

However the number of characters lost does not seem particularly
sensitive to whether or not I have "fast pasting" turned on or off.
With fast pasting turned on:

  D:\r>bug  abc def
  DOS cut-and-paste bug test

  D:\r>def
  Bad command or file name

  D:\r>

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

  D:\r>bug  abc def
  DOS cut-and-paste bug test

  D:\r>bug  abc def
  DOS cut-and-paste bug test

  D:\r>

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

--Norm

- Raw text -


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