Re: Warning fix in gnome-libs/libgnomeui/gnome-less.c



> > I left that warning in on purpose, because it's g_file_exists()'s fault,
> > not gnome-less.c's fault. g_file_exists should take const char *, IMO.
> > There is a similar warning in gnome-dialog.c, IIRC.
> 
> Does anyone know where can I get a C reference?  I have bought the K&R
> book 3 times, and 3 times my friends have borrowed it and are
> unwilling to give it back to me.

I use practical c .... anyway ... I don't really use it much :) ...

> I am curious, as there was a discussion on what is correct:
> 
> const char *x or char const *x.
> 
> I feel lost without a manual.

[this is not from memory but froma book so don't think I actually know
all this:)]

it's supposed to be: "const char* p" makes the data pointed to by the
pointer constant, "char *const p" makes the pointer a constant but the
data it points to can change ... so definately we most likely want the
first one

George

-- 
------------------------------------------------------------------------------
George Lebl <jirka@5z.com> http://www.5z.com/jirka/
------------------------------------------------------------------------------
  The following implements RSA in perl and is illegal to export from the US:

          #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
          $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
          lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]