Newsgroups: comp.os.msdos.djgpp Date: Mon, 13 Sep 1999 18:37:23 +0300 From: Mikko Lehtonen Subject: 1. Win98 2. bug? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII NNTP-Posting-Host: platon.sgic.fi Lines: 81 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello! I have two things: 1. I code in win98 dosbox quite happily, without problems etc. but then I tried in clean win98 dos.. (dos7?) without the gui loaded, and a problem raised! first it told me that there's no dpmi. ah okey, I forgot this, I put cwsdpmi in the dir.. the machines hangs.. and with little more poking, I find that every time I trie to use cwsdpmi, my machine hangs! (no, not in win98 dosBOX when it says protected mode not accesible, which is because of win98's dpmi service ?) has microsoft done a another stupid mistake or have I missed something? 2. I have this program that moves couple of cool lights around on the screen, and then I pondered, that a background could be cool.. so I wrote a fast opentga routine which wasn't completely ripped, but it was some.. the strangest thing happened when playing around with this code! fclose(fp); doesn't work, it crashes the program, free(backg); doesn't work, crashes the program, and if I have neither of them, it crashes in the end anyways. small peezes of code: (its in vesa2 btw.) unsigned int *backg; unsigned int *loadtga(char *filename, int size) { unsigned char r,g,b; int i=0; FILE *fd; unsigned int *p; fd=fopen(filename,"rb"); printf("%d\n",fd); fflush(stdout); if(!fd) { printf("couldn't open file %s!\n",filename); exit(0); } fseek(fd,18,SEEK_SET); p=calloc(size,sizeof(int)); if(!p) { printf("calloc failed in loadtga!\n"); exit(0); } while(!feof(fd) || i