www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/12/22/11:23:28

Date: Thu, 22 Dec 1994 10:44:14 -0500
From: kagel AT ts1 DOT bloomberg DOT com (Art Kagel)
To: Curtiss Cicco <1CMC3466 AT ibm DOT MtSAC DOT edu>, djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Undeclared string variable

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019