delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/12/17/21:51:39

Date: Wed, 17 Dec 1997 18:50:16 -0800 (PST)
Message-Id: <199712180250.SAA13346@adit.ap.net>
Mime-Version: 1.0
To: gam3 AT ra DOT msstate DOT edu, djgpp AT delorie DOT com, djgpp-workers AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: movedata.h problems

At 06:35  12/17/1997 GMT, Greg Moorer wrote:
>I'm trying to use the _dosmemputl function to move a double buffer into
>video memory... this is the code:
[snipped]
>however, upon compilation, I run into multiple parse errors "before
>size_t" in the movedata.h file.  
This seems to be a bug in the movedata.h file. A patch is included which
corrects it. As a workaround, you can add the line
#include <sys/types.h>
before you #include <sys/movedata.h>.
>
>Also, in the info file... the function prototype is
>
>_dosmemputl([buffer pointer], [number of xfers], [destination address]);
>
>however the example provided seems to call the function in this order:
>
>_dosmemputl([buffer pointer], [destination address], [number of xfers]);
You are right. That's a documentation bug. It should be fixed in the next
release.

Patch follows:
*** movedata.h~	Tue Jan 30 23:31:10 1996
--- movedata.h	Wed Dec 17 18:29:06 1997
***************
*** 18,23 ****
--- 18,27 ----
     headers, like <go32.h> and <string.h>.  You may
     include this directly, but it will be non-portable. */
  
+ __DJ_size_t
+ #undef __DJ_size_t
+ #define __DJ_size_t
+ 
  /* These lengths are in bytes, optimized for speed */
  void dosmemget(unsigned long _offset, size_t _length, void *_buffer);
  void dosmemput(const void *_buffer, size_t _length, unsigned long _offset);

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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