gEDA-dev: [PATCH] gschem: Visual feedback for keyboard commands
Peter TB Brett
peter at peter-b.co.uk
Thu May 31 16:07:53 EDT 2007
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.seul.org/pipermail/geda-dev/attachments/20070531/da303f59/attachment.pgp
More information about the geda-dev
mailing list