From: Doug Eleveld 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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.