Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Apr 2005 20:49:26 +0200
From:      Marc Olzheim <marcolz@stack.nl>
To:        Matt <mhersant@comcast.net>
Cc:        misc@openbsd.org
Subject:   Re: C programming question
Message-ID:  <20050404184926.GB56342@stack.nl>
In-Reply-To: <42518AC9.5070208@comcast.net>
References:  <42518AC9.5070208@comcast.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--NDin8bjvE/0mNLFQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Apr 04, 2005 at 11:43:21AM -0700, Matt wrote:
> I need some help understanding some C code.=20
>=20
> int     (*if_ioctl)
>        (struct ifnet *, int, caddr_t);
>=20
> int     (*if_watchdog)
>        (int);
>=20
> Can someone break down these declarations (if that's what they are)?  Is=
=20
> 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

--NDin8bjvE/0mNLFQ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCUYw2ezjnobFOgrERAiNXAJ9V4aHmF5NZfksRGY9CwINpJA/OKwCgrm9H
1CTrkLU1tzrPgvypcFis4YA=
=vxPa
-----END PGP SIGNATURE-----

--NDin8bjvE/0mNLFQ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050404184926.GB56342>