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

Re: gEDA-dev: [PATCH] gschem: Visual feedback for keyboard commands



On Thursday 31 May 2007 21:03:01 Ivan Stankovic wrote:
> On Thu, May 31, 2007 at 08:51:50PM +0100, Peter TB Brett wrote:
> > For a quick nasty hack, why not make the relevant w_current string the
> > data argument to clear_keyaccel_string?
>
> Because then you'll loudly complain that it's a "quick nasty hack"? :)

Yes, but:

(1) It's **my** nasty hack, and therefore okay. :P
(2) It's not a nasty hack which involves storing volatile pointers in
    static variables.

> I was just preparing a patch using that idea when your mail came. So
> here it is. Everything works fine, as in the first patch.

Just a style point for you to consider:


void foo (char *string) {

  g_assert (string);         /* Bad */
  g_assert (string != NULL); /* Good */
}

foo (0);     /* Bad */
foo (NULL);  /* Good */


If you want to check for a null pointer (or pass a null pointer), please do 
that, not assume that NULL == 0.  It helps readability.

Thanks for the patch, I'll test and hopefully apply it this evening, along 
with the i_basic cleanups.

Cheers,

Peter

-- 
Fisher Society                              http://tinyurl.com/o39w2
CU Small-Bore Club                          http://tinyurl.com/mwrc9

      09f911029d74e35bd84156c5635688c0            peter-b.co.uk

PGP signature



_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev