Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Oct 15, 2014
  1. Merge pull request #6 from trespasserw/patch-1

    authored
    avoid extra atom at the end of the targets list
  2. Merge pull request #5 from zevweiss/master

    authored
    Fixes and new functionality for '-t'; also a small build fix
  3. @zevweiss

    Block terminal signals while handling SelectionRequests.

    zevweiss authored
    The intent is to avoid rudely hanging a client that happens to send
    a SelectionRequest just as we are about to exit (e.g. due to
    receiving SIGALRM while in daemon mode with '-t').
Commits on Oct 13, 2014
  1. @trespasserw
Commits on Sep 4, 2014
  1. @zevweiss

    Give --selectionTimeout meaning in --input mode.

    zevweiss authored
    Daemon simply exits after the specified amount of time.
  2. @zevweiss

    Fix setitimer(2) usage.

    zevweiss authored
    For '-t' values >= 1000 the itimerval's timeval members weren't
    getting set properly; using ITIMER_VIRTUAL/SIGVTALRM instead of
    ITIMER_REAL/SIGALRM was making it ineffectual anyway.
Commits on Sep 3, 2014
  1. @zevweiss

    Replace AC_CHECK_LIB with AC_SEARCH_LIBS in configure.ac.

    zevweiss authored
    AC_CHECK_LIB wasn't add -lX11 to LIBS properly.
Commits on Feb 29, 2012
  1. @federicomenaquintero

    Also accept UTF8_STRING for INCR transfers

    federicomenaquintero authored
    See https://bugzilla.gnome.org/show_bug.cgi?id=671066 for the bug that
    started this.
    
    Xsel was only accepting XA_STRING during INCR transfers; now
    it also takes in UTF8_STRING.  Maybe this bug wasn't triggered
    before because most selection transfers are small, and the transfer
    described in the bug is quite large.
Commits on Apr 12, 2011
  1. @jsbillings

    Fixed man page for xsel to remove extra -d

    jsbillings authored committed
    The man page for xsel lists a -d option for both --delete
    and for --display.  The correct use is for --delete.
Commits on Mar 30, 2011
  1. Add Hans de Goede to AUTHORS

    authored
  2. Fix overflow of supported_targets array

    authored
    Patch by Hans de Goede:
    
    I'm one of the developers of spice (a remote virtual machine viewing protocol ala vnc / rdp).
    One of the features of spice is copy / paste between the guest and the client, while testing
    copy and paste with xsel, the spice-client crashed with a BadAtom error. This is caused
    by the spice-client getting the TARGETS property, and then for debugging purposes doing a
    XGetAtomName on all reported target Atoms. xsel however claims to send 9 targets, but
    only send 8 Atoms + 1 piece of random data from memory.
Commits on Dec 9, 2010
  1. add Taylan Ulrich B. to AUTHORS

    authored
  2. Fix logic of input/output options in pipelines

    authored
    Patch by Taylan Ulrich B.
    
    The man page states "If any input or output options are given then the
    program behaves only in the requested mode.", but this doesn't seem to
    be true.
    
    The following will put out "bar", then change the primary selection to "foo".
    
    echo foo | { echo bar | xsel -pi; xsel -po; }
    
    The above example doesn't really make sense since the output of 'echo
    foo' is not otherwise used. However, the following fails too:
    
    echo foo | { echo "$(cat) bar" | xsel -pi; xsel -po; }
    
    That one is a typical example of modifying data in a pipe before
    passing it on to xsel -i, and then showing the result with an extra
    xsel -o. The 'xsel -po' would surely not be expected to affect the
    primary selection, but it does; it seems to read from stdin, which is
    empty because it has been used up by cat, and put it into the primary
    selection, effectively clearing it out.
    (You might say "Put the 'xsel -po' outside the '{...}'.", but that
    part could as well be a shell function or script, over which we'd have
    no control.)
    
        { 'initial_values'  => {},
          'mdf'             => '/u/mdf/mdf-kospi200-woori2.20100910-10199.pcap',
          'branch'          => 'dev'
        },
Commits on Nov 21, 2010
  1. add Sergey Mironov to AUTHORS

    authored
  2. @ierton

    xsel.c: add --zeroflush option

    ierton authored committed
    Zeroflush mode is enhanced --follow mode. With --zeroflush option, xsel
    will clear selection every time it reads '\0' from stdin.
  3. @ierton

    xsel.c: fix --follow mode

    ierton authored committed
Commits on Mar 9, 2010
  1. error out if libX11 is not present

    conrad authored
    git-svn-id: http://svn.kfish.org/xsel/trunk@281 9c49b5d1-7df3-0310-bce2-b7278e68f44c
Commits on Apr 30, 2008
  1. When stdout is a tty, use stderr to ensure there is a newline before

    conrad authored
    the shell prompt.
    
    (Modified) patch from Yair K.:
    
    If the used selection does not end with a newline, then:
     A) If 'xsel -o' than the command prompt may overwrite the last line (depends
    on $PS1, shell, etc. but I think quite likely to happen)
     B) 'xsel -a -o -i' doesn't display the last line (on Linux at least). The
    last line will still exist after appending, but it isn't displayed. This is
    (I suspect) because stdout is line-buffered, so stdout isn't flushed yet.
    
    
    git-svn-id: http://svn.kfish.org/xsel/trunk@249 9c49b5d1-7df3-0310-bce2-b7278e68f44c
Commits on Apr 29, 2008
  1. Make '-a' and '-f' set do_input = True. Patch from Yair K.:

    conrad authored
    Manpage says '-a' and '-f' imply '-i', so I'd expect 'xsel -o -a' to
    display the selection and let me append to it. instead it displays
    the selection and exits.
    
    
    git-svn-id: http://svn.kfish.org/xsel/trunk@248 9c49b5d1-7df3-0310-bce2-b7278e68f44c
  2. use XGetAtomName instead of returning "<unknown atom>".

    conrad authored
    XGetAtomName result is copied to a static buffer and then freed.
    Unneccesary check for utf8_atom!=XA_STRING**, and XSEL_DATA*** were removed.
    
    ** if utf8_atom == XA_STRING, than either atom == XA_STRING or not. If not,
    the atom != utf8_atom and nothing happens. If it is, the previous comparison
    of atom==XA_STRING would have made the function not arrive there at all.
    
    *** XInternAtom with only_if_exists == True does a round-trip to the server
    and back anyway. We might as well just use XGetAtomName.
    
    Patch from Yair K.
    
    
    git-svn-id: http://svn.kfish.org/xsel/trunk@247 9c49b5d1-7df3-0310-bce2-b7278e68f44c
Commits on Apr 21, 2008
  1. Fix for malloc wrapper, from Yair K. (accidentally dropped from

    conrad authored
    last patch):
    malloc(0) returns NULL on glibc. So if size==0, xs_malloc will exit
    with "malloc error". Make sure instead that at least one byte is
    allocated. At the moment, This can only happen if INCR returns
    *value == 0, which I'm not sure is legal.
    
    
    git-svn-id: http://svn.kfish.org/xsel/trunk@224 9c49b5d1-7df3-0310-bce2-b7278e68f44c
  2. Apply patch from Yair K.:

    conrad authored
    1. strncpy is not guranteed to produce a null-terminated string (see man
    page). The wrapper should make sure it's null-terminated.
    
    2. It's odd there's a wrapper for malloc, but not for strdup. It can fail for
    the same reasons since it also allocates memory (or because the argument is
    NULL).
    
    3. malloc(0) returns NULL on Linux. So if size==0, xs_malloc will exit
    with "malloc error". Make sure instead that at least one byte is allocated.
    At the moment, This can only happen if INCR returns *value == 0, which I'm not
    sure is legal.
    
    4. sigsetjmp expects a sigjmp_buf type arg, not a jmp_buf type arg.
    
    5. In some cases an unsigned long value is assigned to an int. e.g.
    in process_multiple (i = md->index. md->index is unsigned long).
    Make sure everything related is unsigned long as well.
    Same at get_append_property (*alloc = *offset + length). incr_alloc, incr_xfer
    were turned to unsigned long in wait_incr_selection to fix this.
    
    This has only been moderately tested.
    
    
    git-svn-id: http://svn.kfish.org/xsel/trunk@223 9c49b5d1-7df3-0310-bce2-b7278e68f44c
  3. Apply patch from Yair K., who explains:

    conrad authored
    There is a compile time dependency on libXt, becuase xsel uses two
    headers files which are from libXt package: X11/Intrinsic.h and
    X11/StringDefs.h (same on debian: dpkg-query -S Intrinsic.h =>
    libxt-dev: /usr/include/X11/Intrinsic.h).
    
    Removing this depedency is possible: the only use of Intrinstic.h as
    far as I can tell is the Boolean typedef, which is easy to replace
    (e.g. Bool type).
    StringDefs.h isn't used at all, and can simply be removed.
    
    http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=38314
    
    
    git-svn-id: http://svn.kfish.org/xsel/trunk@221 9c49b5d1-7df3-0310-bce2-b7278e68f44c
Commits on Mar 24, 2008
  1. Release 1.2.0

    conrad authored
    git-svn-id: http://svn.kfish.org/xsel/trunk@218 9c49b5d1-7df3-0310-bce2-b7278e68f44c
Commits on Feb 14, 2008
  1. add text copy of ICCCM rant

    conrad authored
    git-svn-id: http://svn.kfish.org/xsel/trunk@213 9c49b5d1-7df3-0310-bce2-b7278e68f44c
Commits on Feb 12, 2008
  1. as it turns out we're not actually using any of the X_PRE_LIBS or X_E…

    conrad authored
    …XTRA_LIBS
    
    either ... we basically only depend on libX11 (come to think of it, minimal
    dependency was one of the design goals anyway ...)
    
    
    git-svn-id: http://svn.kfish.org/xsel/trunk@212 9c49b5d1-7df3-0310-bce2-b7278e68f44c
  2. correct manpage section numbers: xsel in 1x (not 1), X in 7 (not 1)

    conrad authored
    The change of xsel to 1x in the manpage text matches the manpage filename,
    and comes from the current Debian patch.
    As for X(7), it doesn't seem to exist, but it is referenced by xset(1) etc.
    
    
    git-svn-id: http://svn.kfish.org/xsel/trunk@211 9c49b5d1-7df3-0310-bce2-b7278e68f44c
  3. update URL for Unix Programming FAQ (in comments for become_daemon)

    conrad authored
    git-svn-id: http://svn.kfish.org/xsel/trunk@210 9c49b5d1-7df3-0310-bce2-b7278e68f44c
  4. remove hardcoded X libraries in Makefile.am, use only those discovere…

    conrad authored
    …d by
    
    autoconf. Reported by Yair K.
    
    
    git-svn-id: http://svn.kfish.org/xsel/trunk@209 9c49b5d1-7df3-0310-bce2-b7278e68f44c
  5. Expand the argument array to handle combined single-letter arguments,…

    conrad authored
    … eg. so
    
    "xsel -ao" is equivalent to "xsel -a -o".
    Patch by Christopher Wellons, adapted to preserve argument order and avoid
    potential memory leaks with multiple groups of arguments.
    
    
    git-svn-id: http://svn.kfish.org/xsel/trunk@208 9c49b5d1-7df3-0310-bce2-b7278e68f44c
Commits on Feb 10, 2008
  1. Release 1.1.0

    conrad authored
    git-svn-id: http://svn.kfish.org/xsel/trunk@207 9c49b5d1-7df3-0310-bce2-b7278e68f44c
Commits on Jan 17, 2008
  1. add release notes for 1.1.0

    conrad authored
    git-svn-id: http://svn.kfish.org/xsel/trunk@206 9c49b5d1-7df3-0310-bce2-b7278e68f44c
  2. Add basic handling of COMPOUND_TEXT.

    conrad authored
    We do not currently serve COMPOUND_TEXT; we can retrieve it but do not
    perform charset conversion.
    
    
    git-svn-id: http://svn.kfish.org/xsel/trunk@205 9c49b5d1-7df3-0310-bce2-b7278e68f44c
Commits on Jan 15, 2008
  1. re-enable autoconf checks for X11 libraries

    conrad authored
    git-svn-id: http://svn.kfish.org/xsel/trunk@204 9c49b5d1-7df3-0310-bce2-b7278e68f44c
Commits on Jan 12, 2008
  1. Release 1.0.0

    conrad authored
    git-svn-id: http://svn.kfish.org/xsel/trunk@203 9c49b5d1-7df3-0310-bce2-b7278e68f44c
Something went wrong with that request. Please try again.