[PATCH] libtXt: add simple example for XtAppNextEvent() man page

walter harms wharms at bfs.de
Mon Jan 24 05:16:34 PST 2011



Am 23.01.2011 18:29, schrieb Alan Coopersmith:
> Thanks for putting these together - I don't know enough about libXt to comment
> on the code examples, but hopefully they'll help others.
> 
> Some notes for all these patches:
> 
>   - please don't restore the old/obsolete CVS id tags that we have
>     previously removed, like this:
> 
>> +.\" $Xorg: XtAppNEv.man,v 1.3 2000/08/17 19:41:58 cpqbld Exp $
> 

was not intentional :)

>   - The preferred subject line format would be:
> 	[PATCH libXt] add simple example for XtAppNextEvent() man page
> 

how can i get GIT to make a header like that ?

>     The bits in [] are to provide information to the e-mail readers, letting
>     us know which module it's for, but are removed by git when applying the
>     patch, leaving the rest of the subject line as the single line summary of
>     the commit that appears in the changelog and release announcement, and
>     you don't need to preface all of those with libXt: when you are reading
>     the libXt announcements or changelogs.

Is "add simple example" ok ? or do you need more text ?

> 
>     Also, you shouldn't duplicate the subject line in the body of the commit
>     message - once is enough.
> 
>   - In the examples:
> 
>> +#include <Xaw/Label.h>
>> +/* gcc -I /usr/include/X11/ sample.c -o sample -lX11 -lXaw */
> 
> That should be #include <X11/Xaw/Label.h>, and then the "-I /usr/include/X11/"
> is not needed.  We never write code such that "-I /usr/include/X11/" is needed,
> and shouldn't show examples that do either.
> 

I did :). Of cause it is no problem to fix but i have seens includes hidden behind /usr/X11R6/
and the idea was to hint users how to use them.
How do you think what is best ?
using:
 gcc sample.c -o sample -lX11 -lXaw
or
 gcc sample.c -lX11 -lXaw

(and what about -Wall ?, i have tested with it)

I prefer to have it short as possible but i got feedback that it may be better to have a "name".

re,
 wh


More information about the xorg-devel mailing list