Questions: Difference between revisions
No edit summary |
some x tricks |
||
| Line 16: | Line 16: | ||
*Q: How can I merge one directory into another? | *Q: How can I merge one directory into another? | ||
*A: <tt>find srcdir -depth -print0 | cpio -pdm0 targdir</tt>. This uses <tt>cpio</tt>'s passthrough mode. | *A: <tt>find srcdir -depth -print0 | cpio -pdm0 targdir</tt>. This uses <tt>cpio</tt>'s passthrough mode. | ||
===[[X]]=== | |||
*Q: How do I get a list of all a display's clients? | |||
*A: <tt>xlsclients</tt> | |||
*Q: How do I get a list of every window? | |||
*A: <tt>xwininfo -root -children</tt> | |||
==[[C]]== | ==[[C]]== | ||
*Q: Why aren't ''"target"''-style <tt>#includes</tt> a good idea with any sane compiler? | *Q: Why aren't ''"target"''-style <tt>#includes</tt> a good idea with any sane compiler? | ||
*A: So long as you can append to the default include search path (ie, the <tt>-I</tt> option to [[gcc]]), the ''<target>''-style include can search in your project directory. Building from the source toplevel, a simple <tt>-I.</tt> added to CFLAGS allows #include <toplevel/relative/filename>. Moved headers will trigger a preprocessing failure. If ''"target"''-style <tt>#includes</tt> are used, the directory of the source being compiled is typically searched prior to other include paths. This means moving source files or introducing new headers can change the files being included, which is almost always undesirable. | *A: So long as you can append to the default include search path (ie, the <tt>-I</tt> option to [[gcc]]), the ''<target>''-style include can search in your project directory. Building from the source toplevel, a simple <tt>-I.</tt> added to CFLAGS allows #include <toplevel/relative/filename>. Moved headers will trigger a preprocessing failure. If ''"target"''-style <tt>#includes</tt> are used, the directory of the source being compiled is typically searched prior to other include paths. This means moving source files or introducing new headers can change the files being included, which is almost always undesirable. | ||