HDTenEightyP/NetNews huggingface dataset:
From: grove@uk.tele.nokia.fi (Paddy Grove)
Subject: Configuration management in C++ projects
Organization: Nokia Telecommunications, Transmission Product Development,
	Cambridge, UK
Date: Tue, 26 Jan 1993 07:53:14 GMT

Hi,

    I'm not sure this is the right place to post this, but I'll give it a go.
I guess many of you guys are working on large C++ projects for commercial
applications, so my question is:

    What configuration management tools do you use? Note that I'm not talking
about version control, although I would be quite interested in that, but I'd
like to know of any commercially-available configuration management and build
systems that handle large C++-based projects well, i.e. large numbers of
developers, several s/w components with lots of source code
inter-dependencies between components.

    It seems to me that using things like SCCS & make just doesn't do the
job. We're currently using DSEE on Apollos, which does the job pretty well,
but we're going to need to upgrade to a new platform in the not-too-distant
future.

    Any answers would be welcome, by email please, since I'm only a very
infrequent visitor to this group.

    Thanks,

        Paddy
--

-----------------------------------------------------------------------------
- Paddy Grove,  Nokia Telecommunications,  Transmission Product Development -
-                    Cambridge, UK.  Tel:  +44 223 423 123                  -
- External Email: grove@uk.tele.nokia.fi       Internal Email: NTL02::GROVE -
-----------------------------------------------------------------------------

Newsgroups: comp.lang.c++,comp.object
From: diamond@jit345.bad.jit.dec.com (Norman Diamond)
Subject: Re: Pros and cons of C++
Reply-To: diamond@jit.dec.com (Norman Diamond)
Organization: Digital Equipment Corporation Japan , Tokyo
Date: Fri, 22 Jan 1993 07:17:46 GMT

In article <1993Jan20.155100.22563@udel.edu> carroll@rockhead.cis.udel.edu (Mark C. Carroll) writes:
>The semantics (meaning) of a language is understood by most people in
>terms of its primitive operations and how they combine. The meaning of
>C++ programs can be made *very* obscure by redefining the meaning of
>those primitive operations.

Like this?

#define sizeof -

>Consider trying to define the meaning of the primitive operation =
>denotationally, when it means one thing almost all of the time, but it
>_can_ take on a completely different meaning when used on _some_ objects.

Define the meaning of the primitive operations in terms of the operations.
Use meta-symbols in your denotations.  Let the C++ terminals initially
refer to the corresponding meta-symbols, but be overrideable in some scopes
just like identifier names can be overridden in nested scopes.
--
Norman Diamond                diamond@jit.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.
Pardon me?  Or do I have to commit a crime first?
Newsgroups: comp.lang.c++
From: kanze@us-es.sel.de (James Kanze)
Subject: Re: setjmp/longjmp question
Organization: SEL
Date: 25 Jan 93 18:46:36

In article <1993Jan8.195613.14303@cadkey.com> erics@cadkey.cadkey.com
(Eric Smith) writes:

|> In <setjmp.h>, Microsoft C has a #ifndef to comment out the entire
|> contents of the file if compiling a C++ program.  Other compilers I
|> use (Borland, ObjectCenter, and one other cfront implementation) allow
|> setjmp/longjmp even from a C++ program.

|> I realize the problems with stack unwinding and object destruction,
|> but why doesn't Microsoft let me use these?  It is kind of a problem
|> when I am porting a straight C program to C++ just to get some
|> additional type checking.

|> I could find no mention of this in the ARM.

|> Does anyone know of any other C++ compiler that doesn't allow setjmp?

No.

The C++ standards committee have said that they are adopting the C
library more or less integrally, so I would suppose that this means
setjmp/longjmp too.

Further, I have actually used setjmp/longjmp in full C++ programs
(with polymorphic classes, etc.).  Obviously, its uses are limited,
and you'd better know what you're doing, but it can be done, and in
the absence of exceptions...
--
James Kanze                             email: kanze@us-es.sel.de
GABI Software, Sarl., 8 rue du Faisan, F-67000 Strasbourg, France
Conseils en informatique industrielle --
                   -- Beratung in industrieller Datenverarbeitung
Newsgroups: comp.lang.c++
From: steve@taumet.com (Steve Clamage)
Subject: Re: Is this C++ advice from an OO book true? (beginner question)
Organization: TauMetric Corporation
Date: Sun, 24 Jan 1993 16:39:07 GMT

sherman@unx.sas.com (Chris Sherman) writes:

>  11.  Call virtual class constructors in dervied class constructors.

>     I pity the poor fools who have to spend nights and weekends searching
>     for the reason that a class variable occasionally takes on strange,
>     unexpected values .  .  .  only to find through their bleary eyes
>     that they forgot to allocate space for a virtual base (super) class,
>     so that storage is allocated for the base class's members.  Even if
>     the class has no members, declare it--you never know what future
>     changes will come back to haunt you (or the person who inherits your
>     mine field)!

Let's assume the wording is poor and the writer means "call the constructor
for virtual base classes in derived class constructors".  This is not
necessarily bad advice, but the reason given is nonsensical.

The constructors for all virtual base classes in a hierarchy are called
when beginning construction of the entire (most-derived) object.  If
the most-derived constructor does not specify which constructor to call
for a virtual base class, the default constructor will be called.  This
is the case even if an intermediate class appears to invoke a particular
base class constructor.  Simple example:

	class Base { ... Base(); Base(int); };
	class D1 : public virtual Base {
		...
		D1(int i) : Base(i) { ... };
	};
	class D2 : public D1 {
		...
		D2(int i) : D1(i) { ... }
	};
	D2 d(2);

When constructing object d, there is no explicit invocation of a Base
constructor in D2::D2(int), so Base::Base() is invoked.  This might seem
surprising if you don't know the rule.  If Base did not have a default
constructor, the example would not even compile.

You can call out explicitly the virtual base class constructors if you wish:
	D2(int i) : Base(i), D1(i) { ... }
This is necessary if you want a particular constructor for a virtual base
class, since you will otherwise get the default initializer (or an error).

On the other hand, if you intend for the default constructor to be called,
you need do nothing, since that is what you will get.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Newsgroups: comp.lang.c++
From: nh@cbnewsg.cb.att.com (nicholas.hounsome)
Subject: Re: How does one use 68000 subroutines with C++ ???
Organization: AT&T
Date: Thu, 21 Jan 1993 10:14:39 GMT

From article <C1640F.54y@cs.uiuc.edu>, by ctaylor@cs.uiuc.edu (Conrad Taylor):
>          I was wondering , is there anyway to use assembly language
> routines with C++?  I'm using SunOS operating system with AT&T 2.1
> CC compiler (cfront).  Thanks in advance to all that reply to this     
> post.
> 
> -Con(rad)
> 
> ps: Please e-mail me at ctaylor@silver.lcs.mit.edu or
>     taylor1@wse.eecs.uic.edu.
> 
> 

The easiest way is to declare them as extern "C" and write them as 
you would for C.

Usualy this means A6 is the frame pointer, A0,A1 & D0,D1 are scratch
registers and the arguments are pushed onto the stack in reverse order
by the caller who removes them after the call. results are usualy
returned in D0. 

Almost everyone does it this way except gnu.

Nick Hounsome AT&T Network Systems UK Ltd
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Newsgroups: comp.lang.c++
Subject: Re: Mixins
Date: 26 Jan 93 22:29:25 GMT
Organization: MAXTAL P/L C/- University Computing Centre, Sydney

In article <1993Jan22.121031.11305@actrix.gen.nz> chris@actrix.gen.nz (Chris Double) writes:
>In article <1993Jan21.005415.2812@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
>> 
>> 	But your greatest achievement, Bjarne, in my opinion,
>> was the name dominance rule, because, coupled with virtual
>> bases and abstract classes that enables mixins.
>> 
>
>Hi.
>
>I've read a lot on this newsgroup about how good mixins are but how
>some compilers don't support them.
>
>I've never come across this term before. Would somebody be able to
>explain what the 'mixin' concept is?

	Sort of 'tailor made classes'. Brew em up as you need
them. Sorry-I'll have to prepare a standard answer to this.
A moderate sized demo is in the works.

>
>Also what is wrong with the compilers that don't support it. I
>understand Borland doesn't. So what isn't borland doing that it
>should?
>

// RE Abstract Classes
// some compilers work and others fail when #define KLUDGE is 
// commented out. Some say D is abstract.
// CLEARLY it is not.
// However rewiting rules in ARM are not clear.
// It is essential for "mix-in" programming that D is concrete.
//
#define KLUDGE
#ifndef KLUDGE
class V {public: virtual void f()=0; virtual void g()=0;};
#else
class V {public: virtual void f(){printf("ERROR V::g\n");} 
	virtual void g(){printf("ERROR V::g\n");}};
#endif
class A1 : public virtual V {public: void f(){printf("A1::f\n");}};
class A2 : public virtual V {public: void g(){printf("A2::g\n");}};
class D : public A1, public A2 {};
int main()
{
	D* d=new D;
	A1 * a1=d;
	A2 * a2=d;
	V * v = d;
	d->f(); a1->f(); a2->f(); v->f();
	d->g(); a1->g(); a2->g(); v->g();
}

-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;------ SCIENTIFIC AND ENGINEERING SOFTWARE ---ph:  2 799 8223 --------
Newsgroups: comp.lang.c++
From: nikki@trmphrst.demon.co.uk (Nikki Locke)
Subject: Re: smart enums
Reply-To: nikki@trmphrst.demon.co.uk
Distribution: world
X-Mailer: cppnews $Revision: 1.31 $
Organization: Trumphurst Ltd.
Date: Fri, 22 Jan 1993 15:53:06 +0000

In article <1993Jan21.054036.27343@hparc0.aus.hp.com> peterj@hparc0.aus.hp.com (Peter Westley) writes:
> I am trying to create a class which implements a "smart enum".  This enum
> type will be able recognise itself as both an int (or other integral type)
> or as char* and also have stndard conversions to both int and char* for
> things sunch as stream insertion.
> 
> The way I am trying to implement them is with templates.  Say I wanted
> an enum class type which could take the values "Apple", "Banana" and "Pear"
> each assigned (an arbitary) int.  Basically to bahave much as an enum normally
> does.
..
> The idea being that I could declare a class based on this template which
> I could have multiple instances of:
> 
> 	char *somenames[] = {"Apple","Banana","Pear"};
> 	char *morenames[] = {"Peter","John","Andrew"};
> 
> 	typedef SmartEnum<somenames> FruitEnum;
> 	typedef SmartEnum<morenames> BoysEnum;
> 	FruitEnum aFruit();
> 	FruitEnum anotherFruit();
> 	BoysEnum aBoy();
> 	BoysEnum anotherBoy();
> 
> Then I could do things like:
> 	aFruit = "Banana";
> 	anotherFruit = 1;
You don't want to do that, surely ! The whole point of enums is that you 
can't convert arbitrary integers to them (but you can convert them to 
integers).

You might want to have increment and decrement operators (provided you 
could test at runtime whether they had been successful).

If you output these enums to a stream in one format more often than the 
other, you might want to have an operator<< which used the default format,
rather than always having to use a cast.

Input operators are another possibility (checking for valid values, of 
course).

-- 
Nikki Locke,Trumphurst Ltd.(PC and Unix consultancy) nikki@trmphrst.demon.co.uk
trmphrst.demon.co.uk is NOT affiliated with ANY other sites at demon.co.uk.
Newsgroups: comp.lang.c++
From: erc@netcom.com (Eric Smith)
Subject: Re: Dangling pointers & suggestions on future implementations of "delete"
Organization: Netcom - Online Communication Services (408 241-9760 guest)
Date: Thu, 21 Jan 1993 08:34:28 GMT

In article <1993Jan20.213807.20740@cbnewsi.cb.att.com> rhw@att.com (Robert Wentworth) writes:
>Anyone else have nifty techniques that they use to root out memory
>problems?

My memory allocation function keeps track of the amount of memory it has
allocated and the amount it has freed.  When the program exits normally,
it verifies that the amount of memory freed equals the amount allocated,
and issues a warning if not.  I have this feature turned on at all times
during development, not just for debugging memory allocation problems.
So if I add a new feature that happens to have a memory leak in it, I find
out right away, even if it has been months or years since my last memory
leak.  And the cost is insignificant, such that it wouldn't hurt even if
I left it turned on in a delivered application.
Newsgroups: comp.lang.c++
From: moe@nuchat.sccsi.com (Norman C. Kluksdahl)
Subject: comp.sys.ibm.pc comp.sys.ibm.pc.programmer comp.sys.ibm.pc.misc
Summary: cpp class interactions; programming problem
Organization: South Coast Computing Services, Inc.
Date: Mon, 25 Jan 1993 21:49:58 GMT

I have a small (large) problem with instances of my classes recognizing
each other.  I have enclosed code snippets to exemplify the problem:

	I have a main, which has the pointers to the class instances as
global variables.  Two types of class instances are used:  a screen handler
and an array of dcsystem objects.  The main program examines the input
file to determine how many dcsystem instances to create, then assignes
the pointer to the array of objects.  The objects are initialized, which
happens correctly, then the screen handler is invoked, which will handle
all screen updates and input events, and will invoke the correct method of
the dcsystem instances.

	The problem is that, while the main loop calls the correct object of the
dcsystem array, the screen handler gets horribly lost.  As a debug, i checked
the pointer to the dcsystem array, and it is badly lost.

The code is compiled with GCC on a 486 PC.

(NOTE:  the code sample below is typed in a hurry, so it may not be precisely
syntactically correct, but it does compile and parts work without error.)

Any suggestions for further debugging or views into what I may have done
wrong would be greatly appreciated.  Please E-mail responses.

###########   CODE SAMPLE    ####################

Dcsys * dcsystem;
Screen * screen_hdlr;

int	numsystems;

main
{
	***  get the number of systems from the input  ***
	dcsystem = new Dcsys[numsystems];

	for ( int i = 0; i<numsystems; i++)
		dcsystem[i].init();

	*** more initialization stuff ***

	screen_hdlr.init();

	*** by this point, the whole system is screwed up ***
}

***** dcsystem.cc

#include screen.h	//  definitions for the screen class	

extern Dcsys *dcsystem;
extern Screen *screen_hdlr;

Dcsys
{
	*** misc class variables ***
public:
	void	init(void);
	void	dump(void);		//  debug module to dump 'this' and values 
							//  of class variables
	void	drawsys(void);	//  module to draw the given instance
}
//  methods to do init, dump, and drawsys follow.  None of these use
//  the screen methods

*****  screen.cc

#include dcsys.h	// definitions for the dcsystem class

extern Dcsys *dcsystem;
extern Screen *screen_hdlr;

Screen
	{
	**** misc class variables ***
public:
	void	init(void);		// this sucker causes no problems; it just sets
							// up the screen
	void	drawsys(int i);	//  this is the problem
}

Screen::drawsys(int i)
{
	*** misc setup, all involving screen_hdlr's variables and other methods

	dcsystem[i].drawsys();		// this causes seg violations
}

**********************************************************************
N. Kluksdahl		moe@nuchat.sccsi.com
Newsgroups: comp.lang.c++
From: ecl2v@uvacs.cs.Virginia.EDU (Edmond C. Loyot)
Subject: C++ Environments
Organization: University of Virginia Computer Science Department
Date: Thu, 21 Jan 1993 21:42:00 GMT

We are evaluating  Unix C++ environments. We are currently using  Object Center C++ and are fairly 
satisfied with it. However, we are interested in hearing from other sites using different Unix C++ environments.
Our requirements are that the environment contain a Compiler and debugger at a minimum. Class browsers etc.
are a bonus. If you are using some other enviroment and can spare a moment please send us your comments.
Please email me directly.

Thanks in advance.

Ed 

Ed Loyot
Dept. of Computer Science
University of Virginia

ecl2v@virginia.edu
From: aruna@tree.egr.uh.edu (Affable)
Newsgroups: comp.lang.c++
Subject: Tool box for c++
Date: 27 Jan 1993 04:44:31 GMT
Organization: University of Houston
Distribution: world
Reply-To: Venkatachalam Aruna <aruna@tree.egr.uh.edu>
NNTP-Posting-Host: cive.egr.uh.edu

 Is there any commercial/free software package available for the objects 
 such as sliders,scrollers, buttons etc? if so, where? And what is the cost
 if it is not free? I'm interested in using them in Sun workstations and 
 IBM-PCs. Every response with any pointer to the info. will be highly
 appreciated and acknowledged.

Thanks in advance,
Venkatachalam Aruna
--
venkat@jetson.uh.edu                | If you love something,set it free.
venkat@menudo.uh.edu                | If it comes back, it is yours.
venkat@uhupvm1.uh.edu               | If it does not, it never was.
aruna@tree.egr.uh.edu(NeXT mails OK)| 
aruna@simpsons.cc.uh.edu (-do-)     |
(713)225-6426(h) & (713)743-4250(w) |
------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: swillden@news.ccutah.edu (Shawn Willden)
Subject: Re: References to functions?
Organization: University of Utah Computer Center
X-Newsreader: Tin 1.1 PL3
Date: Mon, 25 Jan 93 18:25:07 GMT

KOCHER@nvdv.e-technik.uni-stuttgart.dbp.de (HARTMUT KOCHER) writes:
: > References to functions are legal, but not very useful.  I can't
: > think of anything you can do with a reference to a function you
: > can't do with a const pointer to a function in exactly the same way,
: > except for trivial syntax differences at the point of initialization.
: > You use them in exactly the same way.
: > 
: > stuff deleted
: -- 
: > 
: > Steve Clamage, TauMetric Corp, steve@taumet.com
: 
: Not exactly. Let's say I have a callback class which takes a pointer
: to a function in its constructor. If I use a pointer, a 0-pointer may be
: passed. If I use a reference instead, I can make sure, that the user
: supplies a valid function.

Not really.  Try:

typedef int (callbackfunc)(int);

extern void set_callback(callbackfunc&);

void foo()
    {
    callbackfunc* callback = 0;

    set_callback(*callback);
    }

: Hartmut Kocher

--
Shawn Willden
swillden@icarus.weber.edu
Newsgroups: comp.lang.c++
From: hurd@fraser.sfu.ca (Peter L. Hurd)
Subject: neural nets, genetic algorithm object libraries ?
Organization: Simon Fraser University, Burnaby, B.C., Canada
Date: Wed, 27 Jan 1993 12:52:13 GMT

Hi there,
  does anyone know of any PD, SW object libraries for
genetic algorithms or neural nets that I might be able to 
anonymous ftp?
Thanks in advance,
please e-mail replies, my news reader is being a pain, I would be truely
grateful.

-- 
Pete Hurd, hurd@sfu.ca| Q: Why did the Jungle Fowl cross the road?          |
Behavioural Ecology   | A: To maximize it's lifetime reproductive success   |
Dept.Biol.Sci., SFU.  | Q: Huh?                                             |
Burnaby B.C., Canada  | A: I guess it just needed to get to the other side. |
Newsgroups: comp.lang.c++
From: thg@hprnd.rose.hp.com (Terry Gong)
Subject: Re: Help: USL Library Problem on SUN
Date: Thu, 28 Jan 1993 19:38:02 GMT
Organization: HP Roseville Networks Division
X-Newsreader: TIN [version 1.1.3 PL7]

Terry Gong (thg@hprnd.rose.hp.com) wrote:
: I am trying to use the USL library on the Sun SparcStation 2
                         ^^^^^^^^^^^

To be more specific, the USL C++ Standard Components, Release 3.0
Xref: sparky comp.lang.c++:19977 comp.std.c++:2129
From: hlf@nic.cerf.net (Howard Ferguson)
Newsgroups: comp.lang.c++,comp.std.c++
Subject: Re: Callbacks -- suggested approaches??
Date: 26 Jan 1993 21:10:08 GMT
Organization: CERFnet Dial n' CERF Customer Group
NNTP-Posting-Host: nic.cerf.net

In article <1k41efINN2oj@darkstar.UCSC.EDU> spencer@cats.ucsc.edu (Michael Spencer) writes:
>
>davidm@consilium.com (David S. Masterson) writes:
>
>>I'm looking for suggestions on how to handle callback functions in C++ that
>>will be more standard than the one we're currently using.
>
>Would the following approach be helpful. If so, drop me a message.
>
> 
>                         WIDGET CALLBACKS
> 
>Widgets which use callbacks are similarly easy. XSimple widgets attach
>their own callback and pass to it a reference to a coder written
>Procedure. The callback calls the Procedure and passes to it a
>Choice object which contains the data needed to respond to the event.
>For example, to activate a popup dialog widget:
> 
>          PopupYesno (parent, "Do it ?", YesnoProc);   // evoke popup
> 
>          void YesnoProc (Choice chose)    // coder written to handle event
>               {
>               if (chose.flag)
>                    // do something
>                    }
>               else
>                    // do something else
>               }
> 
>The coder written YesnoProc() defines what occurs based on the
>user's election. Choice is an object (declared in XUTILS.H) which
>will hold any information generated by any callback or event handler.
> 
>BUT, the coder need not become involved in the sordid details of
>adding the callback to the widget or extracting the relevant
>information from the returned callback struct. That is done
>automatically and the relevant information is passed via the
>Choice data members. 

Yes but the coder does have to get involved in the sordid details
of the prototype of the YesnoProc. Ther type of the function being
passed in has to be considered. In good old C the function would
be automatically cast to whatever form it was stored in.

	hlf
From: quairoli@cs.widener.edu (Patrick J. Quairoli)
Newsgroups: comp.lang.c++
Subject: buffering iostreams
Date: 25 Jan 1993 22:55:50 -0500
Organization: Widener University CS Department, Chester PA
Distribution: world
NNTP-Posting-Host: wilma.cs.widener.edu
Summary: casting destroys buffering

i'm trying to take a long (i.e. 72) and cast it as a char so
that i get a value of 'H'.  this can be easily done by:

long foo = 72;

cout << (char)foo;

BUT!  i also want the output to be buffered as an long (4 bytes).

i've tried:

cout << setw(sizeof(long)) << (char)foo;

which gives me 'H' but it is not buffered (i.e. its' flush with the
left of the screen and there are no trialing spaces). if it were
buffered as a long it would be 'H   '.

if i use:

cout << setw(sizeof(long)) << foo;

i get 72 and it is buffered with 2 leading spaces (i.e. two bytes)....

? how do i get a long to be cast as a char and still buffer it?

(i'm using BC++ 3.0)

e-mail replies please.
-- 
_____________________________________________________________________________
patrick quairoli           quairoli@cs.widener.edu		department of
rebel coordinator	    widener university		   computing services
"Time is a Spiral - Space is a Curve" - Rush
From: tomlinson@.bbn.com (Ray Tomlinson)
Newsgroups: comp.lang.c++
Subject: BC3.1 reject sts static array of undefined class
Date: 22 Jan 93 15:02:28 GMT
Organization: Bolt Beranek and Newman Inc., Cambridge, MA.
NNTP-Posting-Host: pretzels.bbn.com
Originator: tomlinso@pretzels.bbn.com


The following code elicits an error from BC3.1.  I see nothing
terribly wrong with it.

class X;	// declared in another file

class Y
{
	static const X x[];
};

Produces the error: Error Y.CPP 8: Undefined structure 'X'

I'll grant that class X is undefined in this file, but so what?  In
this case, Y::x will be defined and used in other files which have the
full declaration of class X.