Posted-Date: Tue, 27 Jan 1998 16:19:45 -0600 (CST) Message-ID: <34CE787B.7F72@sparc.isl.net> Date: Tue, 27 Jan 1998 16:15:23 -0800 From: DE Stewart Reply-To: interced AT sparc DOT isl DOT net MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: DJGPP MEMORY.... Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk hey, go32-v2 printf 4,260 or something kb(I know, we only got 8 megs o ram.) and then it printed 131,128 or so kb of swap space. I don't use windows 95, in fact I have no windows running when I'm doing my programs. I use CWSDPMI ... i don't know whats up with symify... here's some code, i tried to isolate it as much as possible: void get_name(char *name, void (*function)(), int x, int y, char color) { int scancode; char ch; int done = FALSE; int index = 0; clear_keybuf(); /* don't want extra stuff :-) */ while(!done) /* terminate input with */ { scancode = readkey(); if( ((scancode >> 8) == KEY_BACKSPACE) && index>0) name[--index] = ' '; /* are we trying to erase? */ else if( (scancode >> 8) == KEY_ENTER) done = 1; /* are we done? */ else /* if not then...*/ { ch = (char)(scancode & 0xff); /* convert scancode to ASCII */ name[index++] = ch; } function(); /* call our received function */ textout(page.active_page, font, name, x, y, color); /* print text */ page_change(); /* do the mode-x stuff */ } } /* FUNCTION: int allocate_map_memory() * This function allocates neccessary memory for a map(i.e. world, town, * cave, etc.) * Returns 1 on successful, and it returns 0 and the error in error_msg * if unsuccessful. */ int allocate_map_memory(int x_screens, int y_screens) { long index; _current_map = malloc(sizeof(map_tile)*x_screens*y_screens*300); if(!_current_map) { strcpy(error_msg,"Error: not enough memory");/* out of mem?*/ return 0; } for(index=0; index