- 论坛徽章:
- 0
|
如下的代码请高手解释:struct authstaticinfo {
const char *auth_name;
char * (*auth_func)(const char *, const char *, char *, int,
void (*)(struct authinfo *, void *),
void *);
int (*auth_prefunc)(const char *, const char *,
int (*)(struct authinfo *, void *),
void *);
void (*auth_cleanupfunc)();
int (*auth_changepwd)(const char *, /* service */
const char *, /* userid */
const char *, /* oldpassword */
const char *); /* new password */
void (*auth_idle)();
/* Not null - gets called every 5 mins when we're idle */
} ;
extern int auth_syspasswd(const char *,
const char *,
const char *,
const char *);
extern struct authstaticinfo *authstaticmodulelist[];
for (i=0; authstaticmodulelist; i++)
{
char *uid;
if (strcmp(authstaticmodulelist->;auth_name,
namebuf))
continue;
uid=(*authstaticmodulelist->;
auth_func)(service,
authtype,
strcpy(authdata_cpy, authdata),
issession,
callback_func,
callback_arg);
我想问:
指针数组中的函数指针是如何定义的,在什么地方实现? |
|