www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/02/10:42:26

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: how to implement a `hook'?
Date: 2 May 2000 14:15:09 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 18
Message-ID: <8emntd$bgt$1@nets3.rz.RWTH-Aachen.DE>
References: <200005011645 DOT LAA08102 AT darwin DOT sfbr DOT org>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 957276909 11805 137.226.32.75 (2 May 2000 14:15:09 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 2 May 2000 14:15:09 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Jeff Williams <jeffw AT darwin DOT sfbr DOT org> wrote:
> What does it mean to implement a `hook', e.g. to add a `hook' in
> foo.c?  Can someone point me to an instructive example from a
> DJGPP port of a GNU package?

A 'hook' is a general concept, rather than a single method, so without
knowing what you want to hook into, it's impossible to help you in
detail. 

Generally, a 'hook' is usually a sort of 'open end' provided by some
third-party code. If you consider the third-party code base as a big,
impenetrable block of machinery, 'hooks' are a method to add small
bits of extension code to that, which the machinery will recognize and
use, if present. The DJGPP File System Extension (FSEXT) feature is a
collection of such open ends that you can hook your own code into.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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