home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
glock20c.zip
/
README.20C
< prev
Wrap
Text File
|
1990-09-06
|
10KB
|
367 lines
Glockenspiel C++ 2.0c (DOS & OS/2) - September 1990
R E A D M E F I L E
This file describes:
. Libraries
. New features in Glockenspiel C++ release 2.0c
. Microsoft keyword syntax restrictions
. Switches update
. Linker update
. CL switches that are incompatible with C++
. Quick C switches unsupported by Microsoft C6.0 and C++
. Notes on Microsoft C header files
. Re-implementing operators new and delete
. Error codes
. Compatibility with Microsoft C version 5.1
. Memory requirements
. Quick Help databases
. Using freestore classes under Windows
. Intermittent error while handling errors
. Install program
Libraries
---------
Large model is the only memory model distributed with this release. Floating
point options are emulation or 80x87 calls with either the 'c' or pascal
calling conventions. The full list of distributed libraries is given below:
LCXXCE.LIB
LCXXPE.LIB
LCXXC7.LIB
LCXXP7.LIB
The naming convention used is as follows:
L Large memory model
CXX The language type, C++
C or P C or pascal calling convention
E or 7 Emulation or 80x87 math
Support is given for Microsoft's -Lr and -Lp switches which distinguish
between Microsoft's real and protected mode libraries. The default C++
library is LCXXCE.LIB while the default C library is LLIBCER.LIB for DOS
and LLIBCEP.LIB for OS/2. The following flags invoke the corresponding
C++ libraries:
-FPi LCXXCE.LIB
-FPc
-FPi87 LCXXC7.LIB
-FPc87
-FPi -Gc LCXXPE.LIB
-FPc -Gc
-FPi87 -Gc LCXXP7.LIB
-FPc87 -Gc
See your Microsoft documentation on the -FP flags for more information on
floating point options and the -Gc switch on controlling the calling
convention.
New features in Glockenspiel C++ 2.0c
-------------------------------------
The following features are not described elsewhere in the documentation
- Microsoft extended keyword support
The _export and _loadds keywords are now fully supported.
They can be placed either in the class definition, the
member function definition or both.
- no limit on environment size with DOS/16M version
- longest identifer now 31 to conform to Microsoft C
- the _fastcall version of the C++ libraries has been
withdrawn and replaced by a _pascal version.
- Bug fixes to the compiler
- long case labels permissable
- 8 bit character support within strings
- type conversion from 0L to any pointer type
- miscellaneous bugfixes to C++ pre-processor problems
associated with 80x87 chips
Microsoft keyword syntax restrictions
-------------------------------------
With the exception of _loadds and _export the use of Microsoft extended
keywords is restricted to within the extern "C" {} construct, eg:
extern "C" {
int _far someFarFunc ( ... ) ;
int _near someNearFunc ( ... );
}
Switches update
---------------
* Memory models
Large model is the only model supported in this release.
* ANSI function prototyping
By default ANSI function prototyping is switched on (+A1) and
can be switched off by using the +A0 switch.
* DLL support switches
!U Invokes the DLL library at link time. For Windows
this defaults to LDLLCE.LIB and LLIBCDLL.LIB for
Presentation Manager.
+MU Ensures the virtual table is set up correctly for objects
constructed in the DLL's data segment.
* Debug options (!Dopt)
!D(opt) - Debug Options for C++ debugging
(opt) == 1, 2, 4 and 6
These options provide a comprehensive debugging environment plus PWB
support. For more information see the booklet on using PWB with
C++ 2.0.
Linker update
-------------
Linker response files can now be passed to the compiler driver on the
command line. These must have either an LNK or ILK file extension.
If the LNK suffix is used the standard linker will be invoked while ILK
invokes the incremental linker.
CL switches that are incompatibe with C++
-----------------------------------------
-B1 -B2 Invoke alternative compiler passes
-B3
-Gi Compile incrementally
-J Change default char type from signed to unsigned
-Lc Same as -Lr
-Li Invoke the incremental linker ILINK
-MA Invoke MASM
-S* See Microsoft C compiler documentation
-Tc Source file does not have '.C' extension
-WX Makes all warnings fatal
-Zg Generates function prototypes to stdout
The following three switches are not supported by C++ but their
equivalents are:
Switch Equivalents
-MD -ALw -Fpi -G2 -DMT -DDLL (OS/2 Only)
-ML -ALw -Fpa -G2 -DMT : Link with LLIBCDLL.LIB (OS/2 Only)
-MT -ALw -Fpa -G2 -DMT : Link with LLIBCCMT.LIB (OS/2 Only)
Quick C switches unsupported by Microsoft C6.0 and C++
------------------------------------------------------
The Microsoft Quick C compiler is invoked by the use of -qc on the command
line. The following switches should not be used in conjunction with -qc:
-Ow , -Gm , -Fa , -Fc , -Fl , -Fs , -FPa , -FPc , -FPc87 , -H , -Zc
Notes on Microsoft C header files
---------------------------------
The file DOS.H (line 68) contains the structure DOSERROR which has a
member called class. As this conflicts with the C++ keyword of the same
same name, it is advisable to change the identifier class.
struct DOSERROR
{
int exterror;
char err_class; // Changed from 'char class;'
char action;
char locus;
};
The MATH.H header file (line 45) contains a structure called complex which
conflicts with the C++ complex class. Conditionally exclude this struct by
using the '__cplusplus' manifest constant.
#ifndef __cplusplus // Wrap the struct using '__cplusplus'
#ifndef _COMPLEX_DEFINED
struct complex
{
double x, y; /* real and imaginary parts */
};
#define _COMPLEX_DEFINED
#endif // __cplusplus
Re-implementing operators new and delete
----------------------------------------
The code for the distributed implementation of operators new and delete is
given below. If requried, the implementation details can be re-written and
linked in with applications. To avoid multiple definitions of new and
delete pass the /NOE switch to the linker.
Source code for new.cxx
typedef void (*PFVV)();
extern PFVV _new_handler;
extern "C"
{
#include <malloc.h>
}
#include <new.hxx>
extern void * operator new ( size_t size )
{
void * _last_allocation;
while ( ( _last_allocation = malloc ( unsigned(size))) == 0 )
{
if ( _new_handler )
(*_new_handler)();
else
return 0;
}
return _last_allocation;
}
Source code for delete.cxx
extern "C"
{
#include <malloc.h>
}
extern void operator delete ( void * p )
{
if ( p )
free ( (char*)p );
}
Source code for placenew.cxx
#include <new.hxx>
void * operator new ( size_t, void * p )
{
return p;
}
NEW.HXX is a distributed header file.
If writing DLLs, change the FreeStore version of new and delete and remake
the FreeStore DLL.
For further information consult Programming in C++ by Stephen C. Dewhurst
and Kathy T. Stark, Chap 7, sec 7.2.
Error codes
-----------
A listing of errors codes is provided in the ERRORS.MSG file. All error
numbers are preceded by an alpha character indicating the compiler phase in
which the error occured.
Compatibility with Microsoft C version 5.1
------------------------------------------
The libraries provided with Glockenspiel C++ 2.0c are compatible with
Microsoft C 5.1 with the exception of floating point routines.
Memory requirements
-------------------
Glockenspiel C++ 2.0c on DOS is implemented using Rational System's
DOS Extender, and will only run on 80286 or 80386 based machines with
640K of base memory and a minimum of one megabyte of extended memory.
When driving a build using NMAKE scripts under DOS, it is recommended
that you drive the build from within PWB or use Microsoft's NMK utility.
Quick Help databases
--------------------
There are two hypertext databases provided with C++ 2.0c, the on-line
C++ Reference Manual and FreeStore class documentation. Both CXXSYN.HLP
and FREESTOR.HLP are in Microsoft Quick Help format and can be used with
either Microsofts QH.EXE program or the Programmer's Workbench help facility.
Using freestore classes under Windows
-------------------------------------
To develop under Windows 3.0 without CommonView freestor.hxx must be
included and the following line added to the start of WinMain():
WindowsFS fs;
If writing a DLL using the Glockenspiel Container framework the
following rule applies :
LocalAllocator must not be used as the FreeStore for the
container.
This restriction will be removed in future releases of Container.
Intermittent error while handling errors
----------------------------------------
If the error codes -7 under OS/2 and 216 under DOS are encountered, this
indicates that syntactically incorrect code has been passed through to
the compiler. To obtain the line number of the error, use the +lx switch
on the command line.
Install program
---------------
The installation program used to install Glockenspiel C++ 2.0c is licensed
software provided by:
Knowledge Dynamics Corporation,
Highway Contract 4 Box 185-H,
Canyon Lake, Texas 78133-3508 (USA).
Phone: 1-512-964-3994
INSTALL is Copyright (c) 1987-1989 by Knowledge Dynamics Corporation
which reserves all copyright protection worldwide. INSTALL is provided
for the exclusive purpose of installing GLOCKENSPIEL C++ 2.0c.