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.5 by greg, Thu Jul 7 14:03:13 1994 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) */
# Line 13 | Line 16 | typedef struct {
16   } LUENT;
17  
18   typedef struct {
19 <        long    (*hashf)();     /* key hash function */
20 <        int     (*keycmp)();    /* key comparison function */
21 <        void    (*freek)();     /* free a key */
22 <        void    (*freed)();     /* free the data */
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 */
22 >        void    (*freed)(char *);       /* free the data */
23          int     tsiz;           /* current table size */
24          LUENT   *tabl;          /* table, if allocated */
25          int     ndel;           /* number of deleted entries */
# Line 66 | Line 69 | typedef struct {
69   * allocated table itself.
70   */
71  
69 #ifdef NOPROTO
70 extern int      lu_init();
71 extern LUENT    *lu_find();
72 extern void     lu_delete();
73 extern void     lu_done();
74 extern long     lu_shash();
75 #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 long     lu_shash(char *);
76 > extern unsigned long    lu_shash(char *);
77 >
78 >
79 > #ifdef __cplusplus
80 > }
81   #endif
82 + #endif /* _MGF_LOOKUP_H_ */
83  
83 extern int      strcmp();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines