PATCH FILE FOR DOPRNT.MAC IN DECUS 11-SP-18 KIT Purpose:- This program calls the function dtoa ($$dtoa) to convert floating and double variables to ascii strings. It allocates a character array BUF of size 20 chars to receive those strings. This is indequate for double precision variables. Ensure that the true size of BUF is passed to $$dtoa. Change convention so that 'e', 'f', and 'g' formats signify double, not single precision numbers. This makes for greater compatibility with other compilers, but not with other versions of the DECUS compiler. This version of the patch should be used only if you intend always to work with the standard UNIX convention of floats promoted to doubles when they are passed to and from functions, that is with the compiler /d switch on and the CC103 patches b1 and b2 installed. Method:- Change the allocation to 30 chars. Pass the true buffer size to $$dtoa. There is a check in dtoa.c to ensure that strings longer than this are not written. Process all arguments as doubles regardless of the case of the format character. Patching:- Patch the DOPRNT.MAC file using SLP. The commands are R SLP DOPRNT.NEW=DOPRNT.OLD,DOPRNT.PAT/A/T where DOPRNT.OLD is the 11-SP-18 version of DOPRNT.MAC, DOPRNT.NEW is the result of the patch and DOPRNT.PAT is the differences file which begins with the line -42 below. -42 ; 0000b1 12-Sep-84 HFR Increased BUF size to 30 for doubles. ; 0000b2 24-Feb-85 HFR Send true BUF size to $$dtoa. ; 0000b3 25-Feb-85 HFR Modified to assume double for %f %e %g -59,59 ;; BUF = LORD-20. ; 20 bytes number output buffer ;b1 BUF = LORD-30. ; 30 bytes number output buffer ;b1 -149,149 ;; BEQ 80$ ;b3 BEQ 77$ ;b3 -153,153 ;; BEQ 80$ ;b3 BEQ 77$ ;b3 -157,157 ;; BEQ 80$ ;b3 BEQ 77$ ;b3 -181,181 ;; mov WIDE(r5),-(sp) ; Restricted width version ;b2 mov #,-(sp) ; Size of BUF space is width ;b2 /