Xref: utzoo comp.os.msdos.programmer:4341 comp.sys.ibm.pc:54796 comp.lang.c++:12547 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!tandem!netcom!resnicks From: resnicks@netcom.COM (Steve Resnick) Newsgroups: comp.os.msdos.programmer,comp.sys.ibm.pc,comp.lang.c++ Subject: Re: Bugs in BC++ 2.0 !! Keywords: bugs turbo borland C++ compiler cputs Message-ID: <1991Mar29.201947.10398@netcom.COM> Date: 29 Mar 91 20:19:47 GMT References: <6286@bwdls58.bnr.ca> Organization: Netcom - Online Communication Services UNIX System {408 241-9760 guest} Lines: 50 In article <6286@bwdls58.bnr.ca> mlord@bwdls58.bnr.ca (Mark Lord) writes: > >So far, I have used BC++ for about three hours. >In that time, I have noticed that the environment is MUCH >more stable than TC++ 1.00/1.01.. *no* crashes of any kind. >I have yet to try the WINDOWS3 stuff, though. > >HOWEVER.. the following two bugs may be of general interest. >I will likely call Borland about them after the Easter weekend. > > > 1) The routines are slightly broken. > When outputing a "\r\n" sequence using either putch() > or cputs(), these routines no longer perform an implicit > clreol() to clean the rest of the line before advancing. > This broke my port of LESS.. very obvious, as the screen > just filled up with identical "garbage" at the end of all > short lines of output. > > My interim work-a-round is to simply perform a clreol() > immediately before outputing "\r\n". > Turbo C 2.0's cputs never did this. I have never tried TC++ so I can't tell you. Personally, I would expect it NOT to do a clreol() unless explicitly called. One "bug" (feature?) I found in the conio stuff is with cgets. In TC Version 2.0 (Why the hell didn they name it Borland C++ 2.0?) cgets called DOS function 0x0A to get it's input. From there you could set buffer[0] = 254 and get 254 characters back. Now, they get the characters using getch. They do a signed comparison on the first byte in the buffer passed. The net result is that you can only read in 127 byte strings. (Argh!) A call to borland cleared this up for me, and basicly told me I need to write a cgets which worked like the TC 2.0 version... - Steve -- ------------------------------------------------------------------------------- resnicks@netcom.com, steve@camphq, IFNA: 1:143/105.0, USNail: 530 Lawrence Expressway, Suite 374 Sunnyvale, Ca 94086 - In real life: Steve Resnick. Flames, grammar and spelling errors >/dev/null 0x2b |~ 0x2b, THAT is the question. The Asylum OS/2 BBS - (408)263-8017 12/2400,8,1 - Running Maximus CBCS 1.2 -------------------------------------------------------------------------------