Mail Archives: djgpp/1994/12/22/11:23:28
The code declares a char pointer string (char *string;) then assigns the malloc
to str which is indeed undeclared. the code S/B:
------------------------------------------------------------------------
#include <stdlib.h>
main()
{
/* allocate memory for a 100 character string */
char *string;
if (( string = (char *) malloc(100)) == NULL)
{
printf( "Not enough memory to allocate buffer\n");
exit(1);
}
printf( "String was allocated!" );
return 0;
}
------------------------------------------------------------------
ASK
tch or
> will DJGPP still be able to give me a linear pixel frame at 0xD000000?
GRX drivers (.grn) support other than 256 colors.
> Second question is the one that everybody got bored with a long time
> ago. I want to release this as a mix 'tween freeware and shareware -
> freeware that accepts donations. So far, everything except the
> _go32_dpmi* functions isn't FSF code - if I use the DJGPP standard
> graphics interface does that put me under any special restrictions? I
> don't think it will since I'll probably release the source too, but I'm
> just checking before I get any time invested in those graphics drivers.
Nope; you're all set.
- Raw text -