Path: utzoo!utgpu!watserv1!watmath!uunet!bu.edu!bu-cs!spdcc!snorkelwacker!tut.cis.ohio-state.edu!HARVARD.HARVARD.EDU!ngo%tammy From: ngo%tammy@HARVARD.HARVARD.EDU (Tom Ngo) Newsgroups: gnu.g++.lib.bug Subject: PlotFile.cc in libg++ 1.36.3 on a Convex Message-ID: <9002080619.AA28402@life.ai.mit.edu> Date: 8 Feb 90 06:17:39 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 66 In general, the plot(5) device-independent graphics format calls for two-byte integer coordinates. On a Convex, the byte ordering of these integers is reversed, necessitating the patch below. --Tom Ngo ngo@harvard.edu =========================================================================== *** PlotFile.cc- Thu Feb 8 01:12:50 1990 --- PlotFile.cc Thu Feb 8 01:13:12 1990 *************** *** 89,94 PlotFile& PlotFile:: operator<<(int x) { File::put((char)(x&0377)); File::put((char)(x>>8)); return *this; --- 89,96 ----- PlotFile& PlotFile:: operator<<(int x) { + #if defined(convex) + File::put((char)(x>>8)); File::put((char)(x&0377)); #else File::put((char)(x&0377)); *************** *** 90,95 PlotFile& PlotFile:: operator<<(int x) { File::put((char)(x&0377)); File::put((char)(x>>8)); return *this; } --- 92,99 ----- #if defined(convex) File::put((char)(x>>8)); File::put((char)(x&0377)); + #else + File::put((char)(x&0377)); File::put((char)(x>>8)); #endif return *this; *************** *** 91,96 { File::put((char)(x&0377)); File::put((char)(x>>8)); return *this; } --- 95,101 ----- #else File::put((char)(x&0377)); File::put((char)(x>>8)); + #endif return *this; } ===========================================================================