HDTenEightyP/NetNews huggingface dataset:
From: rindress@ctron.com (Rindress MacDonald)
Newsgroups: comp.lang.c++
Subject: ********
Date: 29 Sep 92 15:41:03 GMT
Reply-To: rindress@ctron.com (Rindress MacDonald)
Organization: Cabletron Systems Inc



Hi,
  Does anybody know of a UNIX utility that will work like ctags only 
on C++ source code.  I am sure this has been asked before but I can't seem
to find the FAQ list. :-(.  I am very interested in get a tool called "id"
to work on C++ source.  This tool build a database of all the symbols from
a list of source files.  I have used it before on the UNIX kernel source tree
and found it great.  I could lookup an id in seconds :-).  This tools has
the ability to parse other languages, however I am not very sure of the 
syntax of the language, or how to write the parser. :-((  Anyone care to help?
:-)  The parser for the C code is only 293 lines of code.  Well I hope someone
can help ..?

Thanks in advance,
Rindress


------------------------------------------------------------------------------
                   Name: Rindress MacDonald
                  Email: rindress@ctron.com
                Company: Intuitive Graphical Solutions 
        
    Disclaimer:  The opinions expressed here are that of IGS (me) and not of
                 Cabletron Systems.
------------------------------------------------------------------------------
Newsgroups: comp.lang.c++,comp.std.c++
From: engelsma@doberman.cps.msu.edu (Jonathan Engelsma Dr. Reid )
Newsgroups: comp.lang.c++,comp.sys.sun.apps
Subject: Re: C++ Task Library/Real Time Cntrl
Date: 3 Oct 92 13:57:42 GMT
Organization: Dept. of Computer Science, Michigan State University

In article <1992Oct1.200957.19929@msuinfo.cl.msu.edu>, engelsma@borzoi.cps.msu.edu (Jonathan Engelsma ) writes:
|> Has anybody sucessfully used the interrupt handling facility provided
|> in the AT&T C++ tasking library?
|> 
|> I seem to be able to catch the interrupts, but if there is any other
|> tasks waiting on a delay() call, I get a run-time error.  According 
|> to the manual my run-chain is corrupted.
|> 
|> Below is a very simple program that gives me the problem.  It consists
|> of a single interrupt handler which will wait for a ^C.   The main
|> loop will just sit and spin, delaying for one simulation time unit
|> per iteration.  The interrupt handler will just print a brief message
|> whenever you press cntrl-c.  If I comment out the thistask->delay(1.0)
|> statement in the main routine, the program works fine.  Am I doing
|> something wrong? 
|> 
|> Any comments/corrections/suggestions would be greatly appreciated.
|> 
|> Jon
|> 
|> -----------------------demo.cc---------------------------
|> // to compile: CC demo.cc -ltask
|> #include <task.h>
|> #include <iostream.h>
|> #define clock (sched::get_clock())
|> 
|> class CntrlChandler : public Interrupt_handler {
|>     void interrupt();
|> public:
|>     CntrlChandler() ;
|> };
|> 
|> void CntrlChandler::interrupt()
|> {
|>     cout << "yippee, I caught a ^C at t=" << clock << endl  << flush;
|> }
|> 
|> CntrlChandler::CntrlChandler() : Interrupt_handler(SIGINT) { }
|> 
|> CntrlChandler chand;
|> 
|> main()
|> {
|>     while(1) {
|>         thistask->delay(1.0);
|>         cout << "Main delaying: t=" << clock << endl << flush;
|>     }
|> }
|> 
|> 
|> 
|> 
|>  


A quick fix (thanks to Randy Roesler) for the above problem is to add
a call to the interrupt_alerter's delay member at the end of the interrupt
member function.  For example, the member function CntrlChandler::interrupt()
in the above example should look like this:

void CntrlChandler::interrupt()
{
    cout << "yippee, I caught a ^C at t=" << clock << endl  << flush;
    interrupt_alerter.delay(0);
}

-------------------------------------------------------------------------
Jonathan R. Engelsma                            Michigan State University
                                                     Department of
E-mail:   engelsma@cps.msu.edu                     Computer Science
	  uunet!frith!engelsma	
	  uunet!frith!jresys!engelsma (home)	
-------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: mike@taumet.com (Mike Ball)
Subject: Re: constructors & sizeof in C++
Organization: TauMetric Corporation, San Diego
Date: Fri, 2 Oct 1992 14:42:11 GMT

In article <wL06TB1w165w@csource.oz.au> david@csource.oz.au writes:
>
>Is this sort of constructur legal/advisable?
>
>
> Foo::Foo (void)
> {
>
>     memset (this, 0, sizeof(Foo));          // Or bzero()
> }
>

Legal?  Possibly, but it shouldn't be.  The compiler initializes classes
with some important data, like virtual table pointers, and any base
classes will already have been initialized in ways their programmer
felt important.  Though I can't find any specific prohibition, treating
an objece as an array of bytes should probably be undefined behavior.

>Is sizeof(Foo) guaranteed to be the size of the structure containing the
>declared object's non-static data?  Does the result of sizeof() change
>if there are any virtual functions in a base class?  Or is it 'safer'
>to declare a structure to contain the members to initialse, and just
>memset/bzero those?

The safest thing is not to use memset at all unless you know exactly what
the object being cleared consists of.  An array of some basic type, like
int or char, is safe.  Anything with a structure (or for that matter
a pointer) isn't safe.

>I also assume sizeof() also takes into account the size of base class
>non-static members?

sizeof is the space the object takes when part of an array, so it takes
everything into account.

-- 
Michael S. Ball (mike@taumet.com)
TauMetric Corporation
From: jbn@lulea.trab.se (Johan Bengtsson)
Newsgroups: comp.lang.c++
Subject: Re: Persistance Problem Solved by Memory-Mapped Files?
Date: 5 Oct 92 11:40:32 GMT
Organization: Telia Research AB, Aurorum 6, 951 75 Lulea, Sweden
X-Newsreader: Tin 1.1 PL4

maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
: 
: 	But what is a pointer to a non-persistent object
: doing in a persistent one? A cache perhaps?

Yes, it would be very nice to be able to have a transient pointer slot
in persistent objects, to point to a cache.  The transient pointer
should be nulled on disk, so that the next time the persistent
object has been mapped in, a new transient cache can be allocated.

My question is: are there OODBMS that support automatic nullifying (on disk)
of pointers to transient memory in persistent objects?

The alternative seems to be hash tables, mapping persistent objects
to transient cache structures, or "cache envelopes" (smart ptrs).

-- 
--------------------------------------------------------------------------
| Johan Bengtsson, Telia Research AB, Aurorum 6, S-951 75 Lulea, Sweden  |
| Johan.Bengtsson@lulea.trab.se; Voice:(+46)92075471; Fax:(+46)92075490  |
--------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: karhila@fmi.fi (Vesa Karhila)
Subject: Borland debugger w/ dual monitor system
Summary: info needed on running BCC+debugger on a dual monitor system
Keywords: Borland,debugger
Organization: Finnish Academic and Research Network Project - FUNET
Date:  1 Oct 92 11:51:52 GMT

Hi
I'd like to get some info and experiences about using dual monitors
with Borland C++.  We are currently using C++ 3.1, under DOS 5.0 and
Windows 3.1, running on a 486 with ATI's Graphics Ultra display
accelerator.  The problem with the deBugger is the unergonomic
flashes you have to look at when deBugger switches between application
screens in Windows and the DOS deBugger screen.

So, does any one out there have experience using dual monitor system
with Borland deBugger, such that you have Windows running on your
super VGA screen and deBugger on a secondary monochrome monitor?

 1) The pro's are obvious, but what about con's?  E.g.: "Will my mouse
    work on both monitors?",  "How stable is such a system (crashes
    more easily)?" etc.

 2) The possible side effects when using dual monitors?  Trouble
    with other applications?  Trouble with DOS or Windows?

And finally:
 3) Does anybody know if Borland is going to release a Windows
    version of its deBugger?  Any rumours?

All experiences and info on working with dual monitors are welcome.
Please e-mail to:
                    vesa.karhila@fmi.fi
  Vesa Karhila

-- 
       Vesa Karhila                          Tel. (+358)-0-1929 455
       Finnish Meteorological Institute      TLX 124436 EFKL SF
       Technical Department                  TFAX (+358)-0-1929 667
       P.O.BOX 503, SF-00101 Helsinki        E-mail: Vesa.Karhila@fmi.fi
===========================================================================
|         F M I, The Official Weather Service for Santa Claus !           |
===========================================================================
--
       Vesa Karhila                          Tel. (+358)-0-1929 455
       Finnish Meteorological Institute      TLX 124436 EFKL SF
       Technical Department                  TFAX (+358)-0-1929 667
       P.O.BOX 503, SF-00101 Helsinki        E-mail: Vesa.Karhila@fmi.fi
Newsgroups: comp.lang.c++
From: brian@panix.com (Brian Childs)
Subject: Looking for assiciative array Class
Date: Thu, 1 Oct 1992 22:10:23 GMT
Organization: PANIX Public Access Unix & Internet, NYC


Like the subject says, I'm looking for a class for associated arrays
in c++.

Does NIH have this??

Thanks,
Brian
From: ark@alice.att.com (Andrew Koenig)
Newsgroups: comp.lang.c++
Subject: Re: declare keyword, type inference
Date: 5 Oct 92 16:02:32 GMT
Reply-To: ark@alice.UUCP ()
Organization: AT&T Bell Laboratories, Murray Hill NJ

In article <5044@holden.lulea.trab.se> jbn@lulea.trab.se (Johan Bengtsson) writes:

> : But we can't do this because C already requires x, y, and n to be int in
> : the declarations above and I don't think we can get away with breaking
> : C compatibility here.

> Why not?

It's a pragmatic judgment on what I think the standards committee
and user community will be willing to accept.

I would be delighted to see myself proven wrong in this case.
-- 
				--Andrew Koenig
				  ark@europa.att.com
From: Russell.Fleming@mailbox.bison.mb.ca (Russell Fleming)
Newsgroups: comp.lang.c++
Subject: Re: C++ Style
Date: 25 Sep 92 02:57:38 GMT


In article <1992Sep23.140340.3641@ultb.isc.rit.edu>,
mpk9172@ultb.isc.rit.edu (M.P. Kirby) writes:
> 
> I'm an old C hack trying to learn this new fangled C++ thing.  In reading
> stroustrups book, I see that C++ Allows a variable to be declared anywhere.
> 
	... examples deleted ...
> 
> Is there a stylistic advantage for puting the declarations closer to where
> I use them? 

One advantaqe to placing declarations close to where they are used (when
possible) is that you and other programmers who look at your code do not
have to search to make sure that the declarations are correct.  In large
listings, this can be quite frusting and time consuming.  Placing the
declarations near the code segment where they are used allows a
programmer to quickly discern (in many cases) that the code is correct.

Another possible advantage can be a reduction in stack required.  A
smart compiler may be able to determine that a declaration is used in a
small portion of the code.  This is aided when code sections are
bracketed (using the braces {}).  When a compiler can make this type of
determination, it will allow the declarations to share storage on the stack.

=================================================================
Rusty Fleming, Software Consultant @ Tandem Computers Inc.
email: rjf@mpd.tandem.com            Austin, Texas
voice: (512) 244 - 8390              USA

 * Origin: The Electronic Mailbox (1:348/7.0)
From: noye@bcrka378.bnr.ca (Janet Noye)
Newsgroups: comp.lang.c++
Subject: gcc 2.X.X for Decstation 3000/5000?
Date: 1 Oct 92 20:52:20 GMT
Reply-To: noye@bcrka378.bnr.ca (Janet Noye)
Organization: Bell-Northern Research, Ottawa, Canada

Has anyone ported gcc-2.1 or gcc-2.2.2 to the decstation 3000 or 5000?  
I am going to try to do thius soon and would appreciate any help from
anyone whp has already done this.  I am also curious as to how much 
work is involved.  Information about other port of gcc/g++ to the 
Decstations would be of help.

Thanks!
Janet

-------------------------------------------------------------------------------
Janet Noye : email : noye@bnr.ca                mail  : Dept. 5E22
             phone : (613) 763-5985             Bell-Northern Research Ltd.
             fax   : (613) 765-4845             P.O. Box 3511, Station C
                                                Ottawa, Ontario K1Y 4H7
                                                Canada
-------------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: kanze@us-es.sel.de (James Kanze)
Subject: Re: const objects and member functions returning references
Organization: SEL
Date: 29 Sep 92 19:03:37

In article <1992Sep22.072656.1060@cbfsb.cb.att.com>
nh@cbnewsg.cb.att.com (nicholas.hounsome) writes:

> From article <92265.111007KKEYTE@ESOC.BITNET>, by Karl Keyte <KKEYTE@ESOC.BITNET>:
> > 
> >   class X {
> > 
> >      private:    int     value;
> >      public:     int     getValue() const { return value; };
> >   };
> > 
> > Karl
> > 

> Re: references - in general it is more efficient to use:

>    class X {

>       private:    Y     value;
>       public:     const Y&     getValue() const { return value; };
>    };

> This is reasonable for all types not just small ones.
> (Of course this can bring its own problems )

Returning references?

The example function returned an int.

I would never (well almost never) return a reference to an int.

In general, it is better to return an object rather than a reference.
When returning a reference, there is always the question, what does it
refer to.  If the object happens to have a copy of what you are
returning, this is probably OK, but if it doesn't.  (If for example,
you've synthesized the results in the function.)  You definitly don't
want to return a reference to a local (or a temporary).  If you return
a reference to a static, what happens if the user invokes your
function a second time before having finished with the results of the
first invocation.  And if you refer to memory from the heap, who's
going to free it, and when.

There are only two reasons you might want to return a reference,
efficiency and polymorphism.  The latter can be fundamental, and C++
offers no simple solution.  In general, when polymorphism is
important, I return a smart reference.  This is a helper class that
contains a reference to the actual base class, plus forwarding
functions for all of the functions of the base class.  (This would be
a lot easier if you could overload the . operator.)  The constructor
allocated the actual class on the heap, and the destructor deletes it.
(My actual implementation is a bit more complicated, as I usually use
reference counting to avoid unnecessary copies.)

Does anyone know of a better solution?  (Better, in this case, means
less work for the programmer.)
--
James Kanze                         GABI Software, Sarl.
email: kanze@us-es.sel.de           8 rue du Faisan
                                    67000 Strasbourg
                                    France
From: rindress@ctron.com (Rindress MacDonald)
Newsgroups: comp.lang.c++
Subject: A Class brouser for C++....?
Date: 30 Sep 92 14:07:02 GMT
Reply-To: rindress@ctron.com (Rindress MacDonald)
Organization: Cabletron Systems Inc



  Hi,
    I was wondering if anybody has a program (public) that will take C++ style
  and extract information such as what classes are defined in what files,
  what functions are called from what methods, etc.  Sorry if this has been
  asked before but I haven't seen it in the FAQ.  If nobody has it, would
  anybody care to share their opinion of how difficult it would be to build
  such a beast.  I have in mind something like ctags for C++ code.  Well
  any pointers would be greatfully appreciated.


  Thanks in advance,
  Rindress


------------------------------------------------------------------------------
                   Name: Rindress MacDonald
                  Email: rindress@ctron.com
                Company: Intuitive Graphical Solutions

    Disclaimer:  The opinions expressed here are that of IGS (me) and not of
                 Cabletron Systems.
------------------------------------------------------------------------------
From: marka@letaba.cs.rice.edu (Mark Anderson)
Newsgroups: comp.lang.c++
Subject: examples of bison++ code
Summary: Looking for examples of bison++ systems.
Keywords: yacc bison++ error parsing
Date: 30 Sep 92 21:18:59 GMT
Article-I.D.: letaba.marka.717887939
Organization: Rice University

Hi. The recent flurry of postings about complier generators and
such for c++ fits neatly into a problem I have.

I am trying to use Bison++ to generate a yacc-style grammar in c++.
Unfortunately I am learning yacc at the same time. Due to this I am
uncertain exactly what I am doing wrong.  I have read yacc books (the
nutshell guide and one other), but I have reached the point at which I
just need to walk though some working code. I will most likely be
patching things together from a hodgepodge of bison++ and Sun's Lex++.
I am especially interested in the details of how yylex() and yyerror()
fit into the scheme of things, and how the lex++ code gets hacked to
fit in bison++. I seem to remember someone else posting about this
recently. If anyone has any sample code that they can release, or can
give me pointers on where to look, I would be very grateful.

Thanks in advance.
--
Mark Anderson             CS Grad Student                marka@cs.rice.edu
From: ark@alice.att.com (Andrew Koenig)
Newsgroups: comp.lang.c++
Subject: Re: The concept of templates considered ill designed
Date: 28 Sep 92 21:56:54 GMT
Reply-To: ark@alice.UUCP ()
Distribution: comp
Organization: AT&T Bell Laboratories, Murray Hill NJ

In article <RAYMOND.92Sep28145010@cobra.es.ele.tue.nl> raymond@es.ele.tue.nl (Raymond Nijssen) writes:

	<example deleted>

> Now, if the _definition_ of the constructor of the ape class isn't textually
> included in the file in which the template is instantiated, the linker will
> complain that there's no code for this constructor in ape.o.

This is an artifact of the implementation.  For example, under cfront 3.0,
I can do the following:

-----------------------ape.h-----------------------
template <class T> class ape {
public:
	ape();
};

-----------------------ape.c-----------------------
template<class T> ape<T>::ape () {}

-----------------------main.c-----------------------
#include "ape.h"

main()
{
	ape<int> chimp;
	return 0;
}


and I can say

	CC main.c

and all will compile and link automatically.
-- 
				--Andrew Koenig
				  ark@europa.att.com
Newsgroups: comp.lang.c++
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: Abstract base classes, virtual inheritance & mixins
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
Date: Thu, 1 Oct 1992 17:05:08 GMT

In article <717897972snx@trmphrst.demon.co.uk> nikki@trmphrst.demon.co.uk (Nikki Locke) writes:
> I have a problem with virtual inheritance and mixins. I have a class
> structure as follows :-

	BorlandC 3.1 and Zortech are known to be faulty in this
regard. So is cfront. MSC/C++ 7 works. I believe Borland will fix
this in the next release.




-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
From: 4carroll_j@spcvxb.spc.edu
Newsgroups: comp.lang.c++
Subject: Comeau Compiler Opinions
Date: 6 Oct 92 01:58:05 GMT
Organization: St. Peter's College, US


 Hi All,
 
 	I am interested in your experiences with the Comeau C++ cfront compiler. 
 It seems quite likely that we will be purchasing this product very soon, 
 and would like to have any honest evaluations you feel like making.
 
	Please feel free to make comments about technical support  and  personel 
 as  well  as  the  technical  merits  of  the product. This is also an open 
 invitation for promotional literature from Comeau Computing.
 
 Thanks.
 Jim Carroll
From: jbn@lulea.trab.se (Johan Bengtsson)
Newsgroups: comp.lang.c++
Subject: Re: declare keyword, type inference
Date: 5 Oct 92 17:40:12 GMT
Organization: Telia Research AB, Aurorum 6, 951 75 Lulea, Sweden
X-Newsreader: Tin 1.1 PL4

maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
: In article <TMB.92Oct4201915@arolla.idiap.ch> tmb@idiap.ch writes:
: >
: >It's not so clear to me that in the presence of a "declare" keyword,
: >you couldn't get circular dependencies. For example, what about:
: >
: >	declare x = f(&x);
: 
: 	This would only be legal if 
: 
: 	int x = f(&x);
: 
: was legal. Surely you cant initialise a variable with itself like this?

Yes, you can.  Variables/typenames are valid names immediately
after their declarator, but before the initializing expression.
Although it is suspect to use a variables contents in its own initialization,
it may save you some typing for nested types and enumerators.

Example:

{
   Transaction t( t.Write );  // Enumerator, Transaction::Write
   //...
}

Whether this is good programming style or not may perhaps be argued.

-- 
--------------------------------------------------------------------------
| Johan Bengtsson, Telia Research AB, Aurorum 6, S-951 75 Lulea, Sweden  |
| Johan.Bengtsson@lulea.trab.se; Voice:(+46)92075471; Fax:(+46)92075490  |
--------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: frank@Cookie.secapl.com (Frank Adams)
Subject: Multiple inheritance and Borland C++
Date: Thu, 01 Oct 1992 23:33:15 GMT
Organization: Security APL, Inc.

I have Borland C++ v. 3.0.  I wanted to implement a class hierarchy which
made extensive use of multiple inheritance.  (Please don't bother to tell me
why you think this is a good/bad idea.)  I found that Borland puts the
offsets for virtual superclasses in the object, not in the virtual function
table.  I think the idea is that you save code space by not going through
the virtual function table; but that is only true if you don't allocate very
many of these objects.

In short, I think this is a very unreasonable decision, and that Borland
should at least provide a switch to enable the more usual behavior.

What do people think of the merits of this scheme?

Does anyone know if Borland is planning any changes in this area?
Organization: University of Illinois at Chicago
Date: Tuesday, 6 Oct 1992 20:58:09 CDT
From: Dimitrios K. Valsamis <U45561@uicvm.uic.edu>
Newsgroups: comp.lang.c++
Subject:    List Subscription

Hi,

can you please send me some information on how to subsribe to comp.lang.c++?

Thanks in advance,

Dimitrios K. Valsamis(u45561@uicvm.uic.edu)
                          (valsamis@earth.eecs.uic.edu)
Newsgroups: comp.lang.c++
From: schwenk@gloin.cis.udel.edu (Peter A. Schwenk)
Subject: Re: Are InterViews and Borland's Application Framework similar?
Organization: University of Delaware, Newark
Date: Wed, 7 Oct 1992 01:51:53 GMT

I was wondering what Borland's Application Framework was.  Can anyone tell 
me?  I was considering purchasing Borland C++ and couldn't decide if I 
should spring for A. F. with it.
-- 
Newsgroups: comp.lang.c++