ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/mgflib/lookup.h
(Generate patch)

Comparing ray/src/cv/mgflib/lookup.h (file contents):
Revision 1.9 by gwlarson, Fri Sep 4 09:05:09 1998 UTC vs.
Revision 1.11 by schorsch, Sat Jun 7 01:11:17 2003 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1994 Regents of the University of California */
2 <
3 < /* SCCSid "$SunId$ LBL" */
4 <
1 > /* RCSid: $Id$ */
2   /*
3   * Header file for general associative table lookup routines
4   */
5 + #ifndef _MGF_LOOKUP_H_
6 + #define _MGF_LOOKUP_H_
7 + #ifdef __cplusplus
8 + extern "C" {
9 + #endif
10  
11 +
12   typedef struct {
13          char    *key;           /* key name */
14          long    hval;           /* key hash value (for efficiency) */
15          char    *data;          /* pointer to client data */
16   } LUENT;
17  
15 #ifdef NOPROTO
18   typedef struct {
17        unsigned long   (*hashf)();     /* key hash function */
18        int     (*keycmp)();    /* key comparison function */
19        void    (*freek)();     /* free a key */
20        void    (*freed)();     /* free the data */
21        int     tsiz;           /* current table size */
22        LUENT   *tabl;          /* table, if allocated */
23        int     ndel;           /* number of deleted entries */
24 } LUTAB;
25 #else
26 typedef struct {
19          unsigned long   (*hashf)(char *);       /* key hash function */
20          int     (*keycmp)(const char *, const char *);  /* key comparison function */
21          void    (*freek)(char *);       /* free a key */
# Line 32 | Line 24 | typedef struct {
24          LUENT   *tabl;          /* table, if allocated */
25          int     ndel;           /* number of deleted entries */
26   } LUTAB;
35 #endif
27  
28   #define LU_SINIT(fk,fd)         {lu_shash,strcmp,(void (*)())(fk),\
29                                  (void (*)())(fd),0,NULL,0}
# Line 78 | Line 69 | typedef struct {
69   * allocated table itself.
70   */
71  
81 #ifdef NOPROTO
82 extern int      lu_init();
83 extern LUENT    *lu_find();
84 extern void     lu_delete();
85 extern void     lu_done();
86 extern unsigned long    lu_shash();
87 #else
72   extern int      lu_init(LUTAB *, int);
73   extern LUENT    *lu_find(LUTAB *, char *);
74   extern void     lu_delete(LUTAB *, char *);
75   extern void     lu_done(LUTAB *);
76   extern unsigned long    lu_shash(char *);
77 +
78 +
79 + #ifdef __cplusplus
80 + }
81   #endif
82 + #endif /* _MGF_LOOKUP_H_ */
83 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines