[comp.lang.c++] Gorlen's OOPS from prep.ai.mit.edu

adc@cpsvax.cps.msu.edu (Alan Cabrera) (03/16/89)

I'm currently installing Keith Gorlen's OOPS library, Version 2
Release 2, from prep.ai.mit.edu with AT&T C++ Release 1.2.


The installation notes tell me to:

	3.3 Select correct version of _main.c:

	If you are using the "munch" version of the C++ translator:

	        ln _main.c_m _main.c

	Otherwise, you are using the "patch" version of the C++ translator:

	        ln _main.c_p _main.c

I cannot find either file in my distribution kit.  Does anybody
know where I can find these files or find a better source
for the distribution kit?  Thanks.

Alan D. Cabrera
adc@cpsvax.cps.msu.edu

keith@suntory.dcrt.nih.gov (keith gorlen) (03/17/89)

In article <2215@cps3xx.UUCP>, adc@cpsvax.cps.msu.edu (Alan Cabrera) writes:
> Path: nih-csl!uunet!seismo!sundc!pitstop!sun!decwrl!purdue!mailrus!eecae!cps3xx!cpsvax!adc
> From: adc@cpsvax.cps.msu.edu (Alan Cabrera)
> Newsgroups: comp.lang.c++
> Subject: Gorlen's OOPS from prep.ai.mit.edu
> Message-ID: <2215@cps3xx.UUCP>
> Date: 15 Mar 89 18:33:07 GMT
> Sender: usenet@cps3xx.UUCP
> Reply-To: adc@cpsvax.cps.msu.edu (Alan Cabrera)
> Organization: Michigan State University, Computer Science Department
> Lines: 23
> 
> 
> I'm currently installing Keith Gorlen's OOPS library, Version 2
> Release 2, from prep.ai.mit.edu with AT&T C++ Release 1.2.
> 
> 
> The installation notes tell me to:
> 
> 	3.3 Select correct version of _main.c:
> 
> 	If you are using the "munch" version of the C++ translator:
> 
> 	        ln _main.c_m _main.c
> 
> 	Otherwise, you are using the "patch" version of the C++ translator:
> 
> 	        ln _main.c_p _main.c
> 
> I cannot find either file in my distribution kit.  Does anybody
> know where I can find these files or find a better source
> for the distribution kit?  Thanks.
> 
> Alan D. Cabrera
> adc@cpsvax.cps.msu.edu

Here are the modules missing from the OOPS distribution kit on
prep.ai.mit.edu:

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#       _main.c_m
#       _main.c_p
# This archive created: Fri Mar 17 10:51:28 1989
export PATH; PATH=/bin:$PATH
echo shar: extracting "'_main.c_m'" '(1370 characters)'
if test -f '_main.c_m'
then
        echo shar: will not over-write existing file "'_main.c_m'"
else
sed 's/^        X//' << \SHAR_EOF > '_main.c_m'
        X/* _main.c -- "munch" version with NIH Class Library initialization
        X
        X       THIS SOFTWARE FITS THE DESCRIPTION IN THE U.S. COPYRIGHT ACT OF A
        X       "UNITED STATES GOVERNMENT WORK".  IT WAS WRITTEN AS A PART OF THE
        X       AUTHOR'S OFFICIAL DUTIES AS A GOVERNMENT EMPLOYEE.  THIS MEANS IT
        X       CANNOT BE COPYRIGHTED.  THIS SOFTWARE IS FREELY AVAILABLE TO THE
        X       PUBLIC FOR USE WITHOUT A COPYRIGHT NOTICE, AND THERE ARE NO
        X       RESTRICTIONS ON ITS USE, NOW OR SUBSEQUENTLY.
        X
        XAuthor:
        X       Ted Persky
        X       Bg. 12A, Rm. 2031
        X       Computer Systems Laboratory
        X       Division of Computer Research and Technology
        X       National Institutes of Health
        X       Bethesda, Maryland 20892
        X       Phone: (301) 496-2963
        X       uucp: uunet!nih-csl!ted
        X       December, 1988
        X
        XFunction:
        X       _main is called at execution time before the programmer's
        X       "main" program.  It runs through the _ctors array
        X       of constructors and calls them all to initialize static and
        X       external objects.  It finally calls the oops initialization
        X       routine.
        X
        XModification History:
        X
        X$Log:  _main.c_m,v $
        XRevision 2.1  88/12/06  11:42:51  keith
        XRewrite for R2.0 compatibility.
        X
        X*/
        X
        Xstatic char RCSID[] = "$Header: _main.c_m,v 2.1 88/12/06 11:42:51 keith Exp $";
        X
        Xtypedef int (*PFV)();
        X
        Xextern void OOPS_init();
        Xextern PFV _ctors[];
        X
        X#ifdef __cplusplus
        Xextern "C" { extern void _main(); };
        X#endif
        X
        Xextern void _main()
        X{
        X       for (int i=0; _ctors[i] != (PFV) 0; i++)
        X               (*(_ctors[i]))();
        X
        X       OOPS_init();
        X}
SHAR_EOF
if test 1370 -ne "`wc -c < '_main.c_m'`"
then
        echo shar: error transmitting "'_main.c_m'" '(should have been 1370 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'_main.c_p'" '(1786 characters)'
if test -f '_main.c_p'
then
        echo shar: will not over-write existing file "'_main.c_p'"
else
sed 's/^        X//' << \SHAR_EOF > '_main.c_p'
        X/* _main.c -- "patch" version with NIH Class Library initialization
        X
        X       THIS SOFTWARE FITS THE DESCRIPTION IN THE U.S. COPYRIGHT ACT OF A
        X       "UNITED STATES GOVERNMENT WORK".  IT WAS WRITTEN AS A PART OF THE
        X       AUTHOR'S OFFICIAL DUTIES AS A GOVERNMENT EMPLOYEE.  THIS MEANS IT
        X       CANNOT BE COPYRIGHTED.  THIS SOFTWARE IS FREELY AVAILABLE TO THE
        X       PUBLIC FOR USE WITHOUT A COPYRIGHT NOTICE, AND THERE ARE NO
        X       RESTRICTIONS ON ITS USE, NOW OR SUBSEQUENTLY.
        X
        XAuthor:
        X       Ted Persky
        X       Bg. 12A, Rm. 2031
        X       Computer Systems Laboratory
        X       Division of Computer Research and Technology
        X       National Institutes of Health
        X       Bethesda, Maryland 20892
        X       Phone: (301) 496-2963
        X       uucp: uunet!nih-csl!ted
        X       December, 1988
        X
        XFunction:
        X       _main is called at execution time before the programmer's
        X       "main" program.  It runs through the __linkl linked list
        X       of constructors and calls them all to initialize static and
        X       external objects.  It finally calls the NIH Class Library
        X       initialization routine.
        X
        XModification History:
        X
        X$Log:  _main.c_p,v $
        XRevision 2.3  88/12/06  11:26:28  keith
        XFix comments.
        X
        XRevision 2.2  88/12/06  11:22:46  keith
        XRewrite for 2.0 compatibility.
        X
        X*/
        X
        Xstatic char RCSID[] = "$Header: _main.c_p,v 2.3 88/12/06 11:26:28 keith Exp $";
        X
        Xtypedef int (*PFI) ();
        X
        Xstruct __linkl {
        X       struct __linkl* next;   //next link in the chain
        X       PFI ctor;               //ptr to ctor function
        X       PFI dtor;               //ptr to dtor function
        X};
        X
        Xextern void OOPS_init();
        X
        X#ifdef __cplusplus
        X
        Xextern "C" { extern void _main(); };
        Xstruct __linkl* __head;
        X
        X#else
        X
        Xstruct __linkl* __HEAD;
        X
        X#endif
        X
        Xextern void _main()
        X{
        X
        X#ifdef __cplusplus
        X       struct __linkl* current = __head;
        X#else
        X       struct __linkl* current = __HEAD;
        X#endif
        X
        X       for ( ; current != (struct __linkl*) 0; current = current->next)
        X               if (current->ctor != (PFI) 0)
        X                       (*(current->ctor))();
        X
        X       OOPS_init();
        X}
SHAR_EOF
if test 1786 -ne "`wc -c < '_main.c_p'`"
then
        echo shar: error transmitting "'_main.c_p'" '(should have been 1786 characters)'
fi
fi # end of overwriting check
#       End of shell archive
exit 0


	Keith Gorlen			phone: (301) 496-5363
	Building 12A, Room 2017		uucp: uunet!nih-csl!keith
	National Institutes of Health	Internet: keith@alw.nih.gov
	Bethesda, MD 20892