From: "Richard Sim" Newsgroups: comp.os.msdos.djgpp Subject: Help!!! 'return 0;' crashes??? Date: Sun, 28 Dec 1997 23:44:14 +1030 Lines: 32 NNTP-Posting-Host: 203.38.156.43 Message-ID: <34a65140.0@kastagir.senet.com.au> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi, my program works fine...until it gets to the 'return 0;'!!! The wierd thing is it works in text mode but when it's in mode 0x13 it crashes, the routine is loading a data file, it does NOTHING with the screen, no printf's, or anything, only a few fread's, malloc's and memsets! The function is defined as: int readR3D(char *fName, byte type); and it works perfectly in 0x13 until the simple statement 'return 0;', which is the last line, I've tried commenting this out but the same still happens! It doesn't get to the line after the routine was called: setPalettePCX(&startUp); showFullScreenPCX(&startUp); <- Shows the picture fine retVal = readR3D(mainR3DFile, R3D_FILEMAIN); <- Fine here setPalettePCX(&mainScreen); <- Never gets here!!!! showFullScreenPCX(&mainScreen); The line before the return 0; is a fclose, but it works fine in text mode remember. I know that my graphics stuff, pcx stuff and all of that is working fine, just not this little bit! Am I missing something, doing something wrong or is this some wierd bug in DJGPP...very unlikely! And before any of you say it, DJGPP is setup and working fine. :-) All help is greatly needed, thanks, cya. Richard Sim richard AT hyper DOT net DOT au ******************************************* * Richard Sim - Richard Sim - Richard Sim * * richard AT hyper DOT net DOT au * * Richard Sim - Richard Sim - Richard Sim * *******************************************