| getsnarf, putsnarf \- window system snarf (cut and paste) buffer |
| void putsnarf(char *text) |
| access the window system's snarf (cut and paste) buffer. |
| returns a copy of the current buffer; |
| the returned pointer should be freed with |
| sets the buffer to the text string |
| Callers should assume that the snarf buffer is UTF. |
| If the window system does not keep the buffer in UTF, |
| will convert as necessary. |
| .B \*9/src/libdraw/x11-itrans.c |
| On OS X, there are two snarf buffers: the Carbon snarf buffer |
| used by native OS X applications, and the X11 snarf buffer, |
| used by X11 applications. |
| Whenever new text is written to the Carbon snarf buffer, the OS X X11 |
| implementation automatically copies that text to the X11 snarf buffer. |
| The reverse is not done automatically, arguably a bug in the X11 server. |
| writes to both the Carbon snarf buffer and the X11 snarf buffer. |
| To work around this bug in remote or non-Plan 9 X11 clients, run |