Can some body explain this part in a header file for me?
#include <limits.h>
#define BIGNUM unsigned long long
typedef BIGNUM (*hash_t) (char *str);
......
I have hard time for the second part:
typedef BIGNUM (*hash_t) (char *str);
First, I could not find the definition of hash_t, which may be from standard library. Is it? If so, where is the header file for hash_t?
The second is the whole typedef.
Thanks a lot!
This is a function typedef -
typedef BIGNUM (*hash_t) (char *str);
The function returns unsigned long long
, a pointer to signed char
is the argument.
hash_t
is now a function declaration rather than a pure datatype declaration.
The Function Pointer Tutorials - Syntax
As to what header file, I do not know. If you have a hash library (example pcre) check there. I am guessing you want to use this and expect it to be on your system already.
Try
grep 'hash_t' $(find /usr/include -type f -name '*.h')
2 Likes