Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : NEWANDDE.H

 
Output of file : NEWANDDE.H contained in archive : PCCAPP.ZIP
/*
* This file is part of the Choices Operating System
* Developed by: The TAPESTRY Parallel Computing Laboratory
* University of Illinois at Urbana-Champaign
* Department of Computer Science
* 1304 W. Springfield Ave.
* Urbana, IL 61801
*
* Copyright (c) 1987, 1988, 1989, 1990, 1991
* The University of Illinois Board of Trustees.
* All Rights Reserved.
* CONFIDENTIAL INFORMATION. Distribution restricted under license agreement.
*
* Author: David W. Dykstra ([email protected])
* Contributing Author: Lee Lup Yuen ([email protected])
* Project Manager and Principal Investigator: Roy Campbell ([email protected])
*
* Funded by: NSF TAPESTRY Grant No. 1-5-30035, NASA ICLASS Grant
* No. 1-5-25469 and No. NSG1471 and AT&T Metronet Grant No. 1-5-37411.
*/
/*
* NewAndDelete.h - definition of new with placement; analagous to
* NewAndDelete.cc which defines the normal new and delete operators
*/


#ifndef NewAndDelete_h
#define NewAndDelete_h
#ifdef __GNUG__
#pragma once
#pragma interface
#endif

// These operators are used like this:
// In AT&T C++: Widget *w = new (0x1234) Widget;
// In g++: Widget *w = new {0x1234} Widget;
// Unlike "new" statements using the regular syntax (ie. without (...) or
// {...}), the statements above DO NOT allocate any space from the heap
// for the new Widget. Instead, the above statements assume that memory
// is already available at address 0x1234 for the new Widget. The net
// effect of the statements is to call the Widget constructor with the
// "this" pointer set to 0x1234. w will be set to 0x1234 too. The examples
// above will also work if 0x1234 is replaced by a variable.
//
// Warning: As of 1 Feb 92, DJGPP (DOS g++) still refused to compile
// statements with the above syntax. I wrote some assembly code to
// call the constructor directly instead of using the special syntax. - Lup

#ifdef CFRONT

typedef unsigned int size_t;

static inline void * operator
new( size_t, void * where )
{
return( where );
}

#else

static inline void * operator
new( int, void * where )
{
return( where );
}

#endif

#endif /* NewAndDelete_h */


  3 Responses to “Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : NEWANDDE.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/