File: handle.h

package info (click to toggle)
nexus 4.4.3-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,864 kB
  • sloc: cpp: 34,928; ansic: 17,317; f90: 2,326; xml: 2,071; java: 1,953; fortran: 1,529; python: 766; makefile: 532; sh: 460; tcl: 173; lisp: 169
file content (21 lines) | stat: -rw-r--r-- 610 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
  This implements a handle management module. Sometimes it is useful to
  protect the user of some software module from messing with complicated
  datastructures. In such cases it is useful  to use an integer handle
  which can be translated into a pointer when needed by the code implementing
  the module. Such a scheme is implemented in this module.

  Mark Koennecke, October 2000
*/
#ifndef HANDLEHANDLE
#define HANDLEHANDLE

/* The maximum number of handles. */
#define MAXHANDLE 8192

  int HHMakeHandle(void *pData);
  void  *HHGetPointer(int handle);
  void HHRemoveHandle(int handle);  

#endif