C programming question
Marc Olzheim
marcolz at stack.nl
Mon Apr 4 11:49:28 PDT 2005
On Mon, Apr 04, 2005 at 11:43:21AM -0700, Matt wrote:
> I need some help understanding some C code.
>
> int (*if_ioctl)
> (struct ifnet *, int, caddr_t);
>
> int (*if_watchdog)
> (int);
>
> Can someone break down these declarations (if that's what they are)? Is
> this a form of typecasting? Thanks for your help.
/usr/ports/devel/cdecl:
: explain int (*if_ioctl)(struct ifnet *, int, caddr_t);
declare if_ioctl as pointer to function (pointer to struct ifnet, int,
caddr_t) returning int
: explain int (*if_watchdog)(int);
declare if_watchdog as pointer to function (int) returning int
Marc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20050404/2e143324/attachment.bin
More information about the freebsd-hackers
mailing list