plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

getsnarf.3 (728B)


      1 .TH GETSNARF 3
      2 .SH NAME
      3 getsnarf, putsnarf \- window system snarf (cut and paste) buffer
      4 .SH SYNOPSIS
      5 .B #include <draw.h>
      6 .PP
      7 .B
      8 char	*getsnarf(void)
      9 .PP
     10 .B
     11 void	putsnarf(char *text)
     12 .SH DESCRIPTION
     13 .I Getsnarf
     14 and
     15 .I putsnarf
     16 access the window system's snarf (cut and paste) buffer.
     17 .PP
     18 .I Getsnarf
     19 returns a copy of the current buffer;
     20 the returned pointer should be freed with
     21 .I free
     22 (see
     23 .MR malloc (3) )
     24 when no longer needed.
     25 .PP
     26 .I Putsnarf
     27 sets the buffer to the text string
     28 .IR text .
     29 .PP
     30 Callers should assume that the snarf buffer is UTF.
     31 If the window system does not keep the buffer in UTF,
     32 .I getsnarf
     33 and
     34 .I putsnarf
     35 will convert as necessary.
     36 .SH SOURCE
     37 .B \*9/src/libdraw/snarf.c
     38 .SH SEE ALSO
     39 .MR snarfer (1)