Re: C programming question

2005-07-08 Thread Mike Meyer
On Mon, 04 Apr 2005 11:43:21 -0700 Matt <[EMAIL PROTECTED]> wrote: > I need some help understanding some C code. cdecl (devel/cdecl) is your friend. > int (*if_ioctl) > (struct ifnet *, int, caddr_t); explain int (*if_ioctl)(struct ifnet *, int, caddr_t) declare if_ioctl as pointer

Re: C programming question

2005-07-07 Thread Juan J.
El mié, 06-07-2005 a las 13:56 -0400, Michael Shalayeff escribió: > [...] > > Those are declarations of pointers to functions. > > > > /* real function */ > > void dumb(int a) { return a; } > > warning: `return' with a value, in function returning void Obviously dumb must return int, not void.

Re: C programming question

2005-07-07 Thread Juan J.
El lun, 04-04-2005 a las 11:43 -0700, Matt escribió: > [...] > Can someone break down these declarations (if that's what they are)? Is > this a form of typecasting? Thanks for your help. Those are declarations of pointers to functions. /* real function */ void dumb(int a) { return a; } ... /*

Re: C programming question

2005-07-07 Thread chaton
On Mon, 04 Apr 2005 11:43:21 -0700 Matt <[EMAIL PROTECTED]> 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)

Re: C programming question

2005-07-07 Thread Michael Shalayeff
Making, drinking tea and reading an opus magnum from Juan J. [Mart_nez]: [Charset ISO-8859-1 unsupported, filtering to ASCII...] > El lun, 04-04-2005 a las 11:43 -0700, Matt escribis: > > [...] > > Can someone break down these declarations (if that's what they are)? Is > > this a form of typecast

Re: C programming question

2005-04-05 Thread Dunceor .
Since freebsd-hackers also was included in the cc list in the first mail I guess the port exist in FreeBSD. On Apr 5, 2005 10:45 AM, Alexander von Gernler <[EMAIL PROTECTED]> wrote: > * Dan Nelson <[EMAIL PROTECTED]> [2005-04-04 20:55]: > > The cdecl command (ports/devel/cutils) is good as decodin

Re: C programming question

2005-04-05 Thread gilles chehade
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

Re: C programming question

2005-04-05 Thread Mike Meyer
In <[EMAIL PROTECTED]>, Matt <[EMAIL PROTECTED]> typed: > 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 > thi

Re: C programming question

2005-04-04 Thread Dan Nelson
In the last episode (Apr 04), Matt said: > 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 typec

Re: C programming question

2005-04-04 Thread Joerg Sonnenberger
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

Re: C programming question

2005-04-04 Thread Marc Olzheim
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

Re: C programming question

2005-04-04 Thread Devon H. O'Dell
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

C programming question

2005-04-04 Thread Matt
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.