Subject: CYGNUS-WIN32-b17.1 ERROR MESSAGE LOOP-BUG
From: [email-masked] (Tage Westlund)

16 Mar 1997 11:47:58 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0 (Win95; I)
Original-To: [email-masked]
Original-CC: [email-masked]
Original-Sender: [email-masked]

// TO THE CYGWIN32 DESIGNERS! A BUG REPORT FOLLOWS.
// I have an IBM cloned PC with Win95 and the binary version 
// of cygnus-win32-b17.1 ( 2.7.2-961023 )
// ------------------------------------------------------------
// I want to push a little for the opinion that those rather
// frequent enless loops are serious bugs. Specially in con-
// junction with the well known CTRL+C bug it is irritating.
// A compiler should behave like a patient teacher which does
// not rush out of the classroom when the student makes a
// foolish error. It took me hours to find the error below,
// buried as it was in a large code volume and with diffi-
// culties in reading the beginning of the error report.
// You always think the problem is sophisticated, not trivial.
// Please do not misunderstand me; I am otherwise a happy
// supporter of this free software. Thank you that have made it!
// ------------------------------------------------------------
// A "case" where an endless error report loop results from 
// using "{" instead of ";"  This may be more frequent than
// expected at a first glance. You often move the prototype  
// xxx(int a);  from the method definition  xxx(int a){...  }
// I wanted to reduce the code as much as possible but still
// having the loop error preserved. Because of that, if you
// correct the error you will have "ordinary", stable error
// messages. The original class code is without errors.
// Best Regards!
//
// <[email-masked]>
// ------------------------------------------------------------

class Dis {
public:
	Dis(int=4,int=6,int=20,char='.');
	void show(Dis&, vedTextEditor*);
// ###############################################################
	void coutPut1(vedTextEditor*,char*,int){
// ############   Above is the catastrophy   #####################
private:
	int column,row,wid,siz,widpos,*pwid;
	char bgr,*arr,*beg,*cur,*end;
	vedCmdWindow* vCW;
	vedTextEditor* vedCan;
};
// This is the list  Dis.C  of member functions of class Dis
// ---------------------------------------------------------

#include <stream.h>
#include <iostream.h>
#include <fstream.h>
#include <strstream.h>
#include <iomanip.h>

Dis::Dis(int colu,int ro,int wi,char bg) {
	column=colu;
	row=ro;
	wid=wi;
	pwid=&wid;
	bgr=bg;
	siz=colu*ro*wi;
	arr=new char[siz+1];
	end=arr+siz; // This is pointer arithmetics
	beg=cur=arr;
	
	char *ptr; ptr=arr;
	while(ptr != end)*ptr++=bgr; // set background char.
	*ptr='\0'; // end of string mark
}
// ----------------

void Dis::show(Dis& disx, vedTextEditor* vedCan) {
	disx.coutPut1(vedCan,cur,1);	
}
// ----------------
void Dis::coutPut1(vedTextEditor* vedCan,char* pobuff,int contr){
	static char buff[300], *poi;
	if(contr==1){
		poi=&buff[0]; 
		return;
	}
}
// ----------------

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".