delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/31/12:03:31

From: Doug Eleveld <D DOT J DOT Eleveld AT anest DOT azg DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Puzzled:Allegro Code
Date: Wed, 31 Dec 1997 17:39:04 +0100
Organization: Rijksuniversiteit Groningen
Lines: 16
Message-ID: <34AA7528.80B60F29@anest.azg.nl>
References: <683mjc$gj8$1 AT nclient3-gui DOT server DOT virgin DOT net> <438_9712301100 AT softtech DOT st DOT net DOT au>
NNTP-Posting-Host: client36-45.oprit.rug.nl
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Gary wrote:
> 
> Hello all,I am a learner of C and are somewhat puzzled by some code I've come
> across in Allegro,namely in allegro.h where it states as follows
> #define END_OF_FUNCTION(x)   x##_end(){}

It has to do with marking the end of a function so that somewhere else
you can know exactly how long (how much memory) the function is.  This
is necessary when locking the function in memory. i.e. not letting it
get paged out with virtual memory.  This is necessary for functions that
might be called during an interrupt, otherwise you get a crash.

Doug Eleveld

P.S. I believe Allegro's gui.c source file uses that stuff with it's
double click detection. Take a look at that.

- Raw text -


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