delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/07/23/09:12:19

From: jbs30000 AT aol DOT com (Joel)
Newsgroups: comp.os.msdos.djgpp
Subject: malloc question.
Date: 23 Jul 2003 05:54:52 -0700
Organization: http://groups.google.com/
Lines: 16
Message-ID: <84e4e2a9.0307230454.730046e5@posting.google.com>
NNTP-Posting-Host: 172.129.252.198
X-Trace: posting.google.com 1058964892 8077 127.0.0.1 (23 Jul 2003 12:54:52 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: 23 Jul 2003 12:54:52 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

From here
http://www.delorie.com/djgpp/doc/ug/graphics/vbe20.html
I used code to get protected mode function offsets.  And instead of
using vesa_pm_info I just called it VESA_PM.
So, at the part that goes
vesa_pm_info = malloc(r.x.cx); (or in my case VESA_PM =
malloc(r.x.cx))
I got the error:
svga/VBESetup.cpp(12) Error: invalid conversion from `void*' to `
   Vesa_Protected_Mode_Info*'
But when I go VESA_PM = (Vesa_Protected_Mode_Info *)malloc(r.x.cx); I
don't get any error messages.
But of course that doesn't necessarily mean that I'm doing this right,
so I'd like to know, is that correct, or else how am I supposed to fix
the problem?
Thanks.

- Raw text -


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