/*  Patch for iomanip.h -- allows printer stream to handle manipulators
	as the file and memory streams handle I/O manipulator declarations

	Copyright (c) 1995 by Brian Maxwell
	Modifications to IOMANIP.H released to the public domain
*/

/* 
   add the following #if statement to the IOMANIP.H file to make sure you
   have properly defined what a oprnstr is.
   *** This should be added just above the #pragma option -Vo- line ***
*/

#if !defined(__OPRNSTR_H)
#include <oprnstr.h>
#endif

/* 
   immediately following the #pragma option -Vo- block, there are several
   defines for SMANIP, SAPP, IMANIP, etc.

   following that there is a #define IOMANIPdeclare(typ) line

   this is the section to modify.

   In the public: section of class _CLASSTYPE SMANIP(typ) 
	 below the friend ostream _FAR & _Cdecl ... line but before
	  the }; add the following two lines :

		friend oprnstream _FAR & _Cdecl operator<<(oprnstream _FAR & _s, const SMANIP(typ) _FAR & _f) {       \
						(*_f._fn)(_s, _f._ag); return _s; }             \
   
   You must include the '\' at the ends of the line
   see below for actual area.
*/

#define IOMANIPdeclare(typ)                                             \
class _CLASSTYPE SMANIP(typ) {                                          \
		 .
		 .
		 .
public:                                                                 \
		_Cdecl SMANIP(typ)(ios _FAR & (_Cdecl *_f)(ios _FAR &, typ), typ _a) : _fn(_f), _ag(_a) { }\
		friend istream _FAR & _Cdecl operator>>(istream _FAR & _s, const SMANIP(typ) _FAR & _f) {       \
						(*_f._fn)(_s, _f._ag); return _s; }             \
		friend ostream _FAR & _Cdecl operator<<(ostream _FAR & _s, const SMANIP(typ) _FAR & _f) {       \
						(*_f._fn)(_s, _f._ag); return _s; }             \
--->    add the lines here, be sure to end each line with a \        
		};                                                              \
		 .
		 .
		 .
