Changeset 221

Show
Ignore:
Timestamp:
04/21/08 15:16:55 (7 months ago)
Author:
conrad
Message:

Apply patch from Yair K., who explains:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • xsel/trunk/xsel.c

    r210 r221  
    3030#include <setjmp.h> 
    3131#include <signal.h> 
    32 #include <X11/StringDefs.h> 
    3332#include <X11/Xlib.h> 
    34 #include <X11/Intrinsic.h> 
    3533#include <X11/Xatom.h> 
    3634 
     
    7472 
    7573/* do_follow: Follow mode for output */ 
    76 static Boolean do_follow = False; 
     74static Bool do_follow = False; 
    7775 
    7876/* nodaemon: Disable daemon mode if True. */ 
    79 static Boolean no_daemon = False; 
     77static Bool no_daemon = False; 
    8078 
    8179/* logfile: name of file to log error messages to when detached */ 
     
    490488 * If an error is encountered, the buffer is free'd. 
    491489 */ 
    492 static Boolean 
     490static Bool 
    493491get_append_property (XSelectionEvent * xsl, unsigned char ** buffer, 
    494492                     int * offset, int * alloc) 
     
    547545  unsigned char * incr_base = NULL, * incr_ptr = NULL; 
    548546  int incr_alloc = 0, incr_xfer = 0; 
    549   Boolean wait_prop = True; 
     547  Bool wait_prop = True; 
    550548 
    551549  print_debug (D_TRACE, "Initialising incremental retrieval of at least %d bytes\n", init_alloc); 
     
    601599  unsigned long bytesafter, length; 
    602600  unsigned char * value, * retval = NULL; 
    603   Boolean keep_waiting = True; 
     601  Bool keep_waiting = True; 
    604602 
    605603  while (keep_waiting) { 
     
    777775 */ 
    778776static unsigned char * 
    779 read_input (unsigned char * read_buffer, Boolean do_select) 
     777read_input (unsigned char * read_buffer, Bool do_select) 
    780778{ 
    781779  int insize = in_statbuf.st_blksize; 
     
    917915 * granted, and False otherwise. 
    918916 */ 
    919 static Boolean 
     917static Bool 
    920918own_selection (Atom selection) 
    921919{ 
     
    10271025/* Forward declaration of process_multiple() */ 
    10281026static HandleResult 
    1029 process_multiple (MultTrack * mt, Boolean do_parent); 
     1027process_multiple (MultTrack * mt, Bool do_parent); 
    10301028 
    10311029/* 
     
    11391137 */ 
    11401138static void 
    1141 complete_multiple (MultTrack * mt, Boolean do_parent, HandleResult hr) 
     1139complete_multiple (MultTrack * mt, Bool do_parent, HandleResult hr) 
    11421140{ 
    11431141  MultTrack * mparent = mt->mparent; 
     
    13681366 */ 
    13691367static HandleResult 
    1370 process_multiple (MultTrack * mt, Boolean do_parent) 
     1368process_multiple (MultTrack * mt, Bool do_parent) 
    13711369{ 
    13721370  HandleResult retval = HANDLE_OK; 
     
    15071505 * Returns True otherwise. 
    15081506 */ 
    1509 static Boolean 
     1507static Bool 
    15101508handle_selection_request (XEvent event, unsigned char * sel) 
    15111509{ 
     
    15131511  XSelectionEvent ev; 
    15141512  HandleResult hr = HANDLE_OK; 
    1515   Boolean retval = True; 
     1513  Bool retval = True; 
    15161514 
    15171515  print_debug (D_TRACE, "handle_selection_request, property=0x%x (%s), target=0x%x (%s)", 
     
    19001898main(int argc, char *argv[]) 
    19011899{ 
    1902   Boolean show_version = False; 
    1903   Boolean show_help = False; 
    1904   Boolean do_append = False, do_clear = False; 
    1905   Boolean do_keep = False, do_exchange = False; 
    1906   Boolean do_input = False, do_output = False; 
    1907   Boolean dont_input = True, dont_output = False; 
    1908   Boolean want_clipboard = False, do_delete = False; 
     1900  Bool show_version = False; 
     1901  Bool show_help = False; 
     1902  Bool do_append = False, do_clear = False; 
     1903  Bool do_keep = False, do_exchange = False; 
     1904  Bool do_input = False, do_output = False; 
     1905  Bool dont_input = True, dont_output = False; 
     1906  Bool want_clipboard = False, do_delete = False; 
    19091907  Window root; 
    19101908  Atom selection = XA_PRIMARY, test_atom;