emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xselect.c


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/src/xselect.c
Date: Fri, 22 Feb 2002 05:42:23 -0500

Index: emacs/src/xselect.c
diff -c emacs/src/xselect.c:1.107 emacs/src/xselect.c:1.108
*** emacs/src/xselect.c:1.107   Sun Oct 21 08:13:46 2001
--- emacs/src/xselect.c Fri Nov  2 15:39:03 2001
***************
*** 304,310 ****
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (sf);
    int count;
  
!   CHECK_SYMBOL (selection_name, 0);
    selection_atom = symbol_to_x_atom (dpyinfo, display, selection_name);
  
    BLOCK_INPUT;
--- 304,310 ----
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (sf);
    int count;
  
!   CHECK_SYMBOL (selection_name);
    selection_atom = symbol_to_x_atom (dpyinfo, display, selection_name);
  
    BLOCK_INPUT;
***************
*** 415,421 ****
        count = specpdl_ptr - specpdl;
        specbind (Qinhibit_quit, Qt);
  
!       CHECK_SYMBOL (target_type, 0);
        handler_fn = Fcdr (Fassq (target_type, Vselection_converter_alist));
        if (!NILP (handler_fn))
        value = call3 (handler_fn,
--- 415,421 ----
        count = specpdl_ptr - specpdl;
        specbind (Qinhibit_quit, Qt);
  
!       CHECK_SYMBOL (target_type);
        handler_fn = Fcdr (Fassq (target_type, Vselection_converter_alist));
        if (!NILP (handler_fn))
        value = call3 (handler_fn,
***************
*** 1173,1184 ****
    if (CONSP (obj))
      return Fcons (XCAR (obj), copy_multiple_data (XCDR (obj)));
      
!   CHECK_VECTOR (obj, 0);
    vec = Fmake_vector (size = XVECTOR (obj)->size, Qnil);
    for (i = 0; i < size; i++)
      {
        Lisp_Object vec2 = XVECTOR (obj)->contents [i];
!       CHECK_VECTOR (vec2, 0);
        if (XVECTOR (vec2)->size != 2)
        /* ??? Confusing error message */
        Fsignal (Qerror, Fcons (build_string ("vectors must be of length 2"),
--- 1173,1184 ----
    if (CONSP (obj))
      return Fcons (XCAR (obj), copy_multiple_data (XCDR (obj)));
      
!   CHECK_VECTOR (obj);
    vec = Fmake_vector (size = XVECTOR (obj)->size, Qnil);
    for (i = 0; i < size; i++)
      {
        Lisp_Object vec2 = XVECTOR (obj)->contents [i];
!       CHECK_VECTOR (vec2);
        if (XVECTOR (vec2)->size != 2)
        /* ??? Confusing error message */
        Fsignal (Qerror, Fcons (build_string ("vectors must be of length 2"),
***************
*** 1958,1964 ****
       Lisp_Object selection_name, selection_value;
  {
    check_x ();
!   CHECK_SYMBOL (selection_name, 0);
    if (NILP (selection_value)) error ("selection-value may not be nil");
    x_own_selection (selection_name, selection_value);
    return selection_value;
--- 1958,1964 ----
       Lisp_Object selection_name, selection_value;
  {
    check_x ();
!   CHECK_SYMBOL (selection_name);
    if (NILP (selection_value)) error ("selection-value may not be nil");
    x_own_selection (selection_name, selection_value);
    return selection_value;
***************
*** 1982,2000 ****
    struct gcpro gcpro1, gcpro2;
    GCPRO2 (target_type, val); /* we store newly consed data into these */
    check_x ();
!   CHECK_SYMBOL (selection_symbol, 0);
  
  #if 0 /* #### MULTIPLE doesn't work yet */
    if (CONSP (target_type)
        && XCAR (target_type) == QMULTIPLE)
      {
!       CHECK_VECTOR (XCDR (target_type), 0);
        /* So we don't destructively modify this...  */
        target_type = copy_multiple_data (target_type);
      }
    else
  #endif
!     CHECK_SYMBOL (target_type, 0);
  
    val = x_get_local_selection (selection_symbol, target_type);
  
--- 1982,2000 ----
    struct gcpro gcpro1, gcpro2;
    GCPRO2 (target_type, val); /* we store newly consed data into these */
    check_x ();
!   CHECK_SYMBOL (selection_symbol);
  
  #if 0 /* #### MULTIPLE doesn't work yet */
    if (CONSP (target_type)
        && XCAR (target_type) == QMULTIPLE)
      {
!       CHECK_VECTOR (XCDR (target_type));
        /* So we don't destructively modify this...  */
        target_type = copy_multiple_data (target_type);
      }
    else
  #endif
!     CHECK_SYMBOL (target_type);
  
    val = x_get_local_selection (selection_symbol, target_type);
  
***************
*** 2035,2041 ****
    check_x ();
    display = FRAME_X_DISPLAY (sf);
    dpyinfo = FRAME_X_DISPLAY_INFO (sf);
!   CHECK_SYMBOL (selection, 0);
    if (NILP (time))
      timestamp = last_event_timestamp;
    else
--- 2035,2041 ----
    check_x ();
    display = FRAME_X_DISPLAY (sf);
    dpyinfo = FRAME_X_DISPLAY_INFO (sf);
!   CHECK_SYMBOL (selection);
    if (NILP (time))
      timestamp = last_event_timestamp;
    else
***************
*** 2096,2102 ****
       Lisp_Object selection;
  {
    check_x ();
!   CHECK_SYMBOL (selection, 0);
    if (EQ (selection, Qnil)) selection = QPRIMARY;
    if (EQ (selection, Qt)) selection = QSECONDARY;
    
--- 2096,2102 ----
       Lisp_Object selection;
  {
    check_x ();
!   CHECK_SYMBOL (selection);
    if (EQ (selection, Qnil)) selection = QPRIMARY;
    if (EQ (selection, Qt)) selection = QSECONDARY;
    
***************
*** 2126,2132 ****
      return Qnil;
  
    dpy = FRAME_X_DISPLAY (sf);
!   CHECK_SYMBOL (selection, 0);
    if (!NILP (Fx_selection_owner_p (selection)))
      return Qt;
    if (EQ (selection, Qnil)) selection = QPRIMARY;
--- 2126,2132 ----
      return Qnil;
  
    dpy = FRAME_X_DISPLAY (sf);
!   CHECK_SYMBOL (selection);
    if (!NILP (Fx_selection_owner_p (selection)))
      return Qt;
    if (EQ (selection, Qnil)) selection = QPRIMARY;
***************
*** 2166,2173 ****
  }
  
  
! #define CHECK_CUT_BUFFER(symbol,n)                                    \
!   { CHECK_SYMBOL ((symbol), (n));                                     \
      if (!EQ((symbol), QCUT_BUFFER0) && !EQ((symbol), QCUT_BUFFER1)    \
        && !EQ((symbol), QCUT_BUFFER2) && !EQ((symbol), QCUT_BUFFER3)   \
        && !EQ((symbol), QCUT_BUFFER4) && !EQ((symbol), QCUT_BUFFER5)   \
--- 2166,2173 ----
  }
  
  
! #define CHECK_CUT_BUFFER(symbol)                                      \
!   { CHECK_SYMBOL ((symbol));                                  \
      if (!EQ((symbol), QCUT_BUFFER0) && !EQ((symbol), QCUT_BUFFER1)    \
        && !EQ((symbol), QCUT_BUFFER2) && !EQ((symbol), QCUT_BUFFER3)   \
        && !EQ((symbol), QCUT_BUFFER4) && !EQ((symbol), QCUT_BUFFER5)   \
***************
*** 2199,2205 ****
    display = FRAME_X_DISPLAY (sf);
    dpyinfo = FRAME_X_DISPLAY_INFO (sf);
    window = RootWindow (display, 0); /* Cut buffers are on screen 0 */
!   CHECK_CUT_BUFFER (buffer, 0);
    buffer_atom = symbol_to_x_atom (dpyinfo, display, buffer);
  
    x_get_window_property (display, window, buffer_atom, &data, &bytes,
--- 2199,2205 ----
    display = FRAME_X_DISPLAY (sf);
    dpyinfo = FRAME_X_DISPLAY_INFO (sf);
    window = RootWindow (display, 0); /* Cut buffers are on screen 0 */
!   CHECK_CUT_BUFFER (buffer);
    buffer_atom = symbol_to_x_atom (dpyinfo, display, buffer);
  
    x_get_window_property (display, window, buffer_atom, &data, &bytes,
***************
*** 2244,2251 ****
    if (max_bytes > MAX_SELECTION_QUANTUM)
      max_bytes = MAX_SELECTION_QUANTUM;
  
!   CHECK_CUT_BUFFER (buffer, 0);
!   CHECK_STRING (string, 0);
    buffer_atom = symbol_to_x_atom (FRAME_X_DISPLAY_INFO (sf),
                                  display, buffer);
    data = (unsigned char *) XSTRING (string)->data;
--- 2244,2251 ----
    if (max_bytes > MAX_SELECTION_QUANTUM)
      max_bytes = MAX_SELECTION_QUANTUM;
  
!   CHECK_CUT_BUFFER (buffer);
!   CHECK_STRING (string);
    buffer_atom = symbol_to_x_atom (FRAME_X_DISPLAY_INFO (sf),
                                  display, buffer);
    data = (unsigned char *) XSTRING (string)->data;
***************
*** 2297,2303 ****
    check_x ();
    display = FRAME_X_DISPLAY (sf);
    window = RootWindow (display, 0); /* Cut buffers are on screen 0 */
!   CHECK_NUMBER (n, 0);
    if (XINT (n) == 0)
      return n;
    if (! FRAME_X_DISPLAY_INFO (sf)->cut_buffers_initialized)
--- 2297,2303 ----
    check_x ();
    display = FRAME_X_DISPLAY (sf);
    window = RootWindow (display, 0); /* Cut buffers are on screen 0 */
!   CHECK_NUMBER (n);
    if (XINT (n) == 0)
      return n;
    if (! FRAME_X_DISPLAY_INFO (sf)->cut_buffers_initialized)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]