Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!leah!bingvaxu!vu0310 From: vu0310@bingvaxu.cc.binghamton.edu (R. Kym Horsell) Newsgroups: comp.lang.c Subject: Re: pointers is pointers (a cautionary tale) Message-ID: <3905@bingvaxu.cc.binghamton.edu> Date: 29 Aug 90 03:05:09 GMT References: <0891@sheol.UUCP> Reply-To: vu0310@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (R. Kym Horsell) Organization: SUNY Binghamton, NY Lines: 26 I once (and, luckily, only one) had to convert a large C program from something that ran fairly well on a VAX to a DG MV 20000 (*not* a 2000). Without a handy-dandy document at hand I quickly found a mysterious problem with (char *) vs other pointers -- the program tended to consequently bomb at the drop of a hat. Solution -- get the thing to work in TURBOC (VAX C didn't have prototyping at that time -- under Eunice (Ultrix was not available to me at that time)) with prototypes for *every* procedure in the whole program. A little lex job was ideal for finding all the appropriate headers (ctags didn't find all the parameter defs) and assembling them into, as I recall, a rather large header file that was subsequently included in all relevant C sources. Still under TURBO all appropriate pointer problems were found and appropriate casts installed (too bad this couldn't be easily done in Lex too -- there were *quite* a few of these guys). The program was then moved back to the 20000 and voila! No problems! The move from VAX -> 20000 was worth it as well; the program ran about 10 times faster... -Kym Horsell