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
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.
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; }
...
/*
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)
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
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
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
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
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
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
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
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
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.
13 matches
Mail list logo