From: "Chris A. Triebel" Newsgroups: comp.os.msdos.djgpp Subject: Re: Growing pains with DJGPP Date: Mon, 14 Apr 1997 14:24:42 -0400 Organization: University of New Hampshire - Durham, NH Lines: 85 Message-ID: References: <5ingih$3dq$1 AT sparcserver DOT lrz-muenchen DOT de> <5io2gf$t3c$2 AT grissom DOT powerup DOT com DOT au> NNTP-Posting-Host: sun4.iol.unh.edu Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <5io2gf$t3c$2@grissom.powerup.com.au> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp > > > >My first one would be: how is the portability between DJGPP written > >under DOS and Linux? > >Basicly speaking it should be fine, but if anyone has experience with > >it, I would appreciate any comments. > I don't know about linux, but I use UNIX at uni and generally I can write a > program at home at ftp it to uni. it compiles fine and is going to make > assignment a dream :) > Personally I have done the same thing, compiling programs on several unix platforms, linux, and djgpp fairly efficiently. Once I had a problem where a function was provided by djgpp that wasn't on other unix platforms, I forget which ... But I do remember finding an alternative function. > > > > >Second one: I know DJGPP has access to the full Memory in my system > >(Pmode and that stuff), so we're talking about no more Memory model > >worrys right? If I felt like it I could construct a two dimensional > >array with over 64kb of Space? (e.g. char string[32000][32000]) (old > >BC 3.1 user :-)) I could also just make my heap a few million bytes > >big and use that as buffer? (not the best idea, I know we're talking > >theory here) > I managed to malloc a 128Mb array of ints, and I only have 8Mb of RAM! I was > wondering if DJGPP double buffers or something I didn't recieve an error or > a NULL from the malloc command. I don't think double buffering is the correct word here. I believe the word is swapping. All of memory is divided into pages, when you need a page it is brought into memory from a swap space on disk. When you run out of room in memory and you need another page, one is chosen to be swapped out -- sent back to the disk -- and the new one is swapped in its place. This is very hardware level stuff. > > > > >Third: I experimented with Allegro and I found out that when I > >initialize Keyboard, Timer or something like that and want a > >return_message (int), the software will not initiallize correctly. As > >soon as I took out the return int, it went fine. Is that a prob with > >Allegro? In the short doc it states that one generally isn't > >interrested in the return code, but I would just like to know if > >everything went well. It might have been that the author thought that > >nobody would use it anyways so he might have not taken care of his > >return code (in-line assembler or so???) > I couldn't find the putpixel command in Allegro. I searched a dozen .C files ^^ I believe that should be .c, there is a difference. .c => c language .C => C++ language ( as does .cxx, .cc, .cpp ... ) > (they all #include allegro.h) but I couldn't find the right one. Maybe they > should have more internal documentation like: > > /* first.c */ > function prototype > function prototype > > /* second.c */ > etc. I don't have allegro handy, but one thing I did at home is used ctags. vi supports ctags, emacs supports etags ( essentially the same program I think ). With ctags go to the allegro install directory and type in the following. ctags src/*.c allegro.h What this will generate is a tags file which you can read through to find function definitions and such, or use vi ... vi -t putpixel ... to look up the function for you. Just a suggestion. --- All the above is as true as I know. Please inform me of errors so that I may learn from them. I do like to help out, I just don't always know as much as I think I do ;) cat