emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Andreas Schwab
Subject: [Emacs-diffs] Changes to emacs/src/xfns.c
Date: Thu, 17 Feb 2005 07:49:36 -0500

Index: emacs/src/xfns.c
diff -c emacs/src/xfns.c:1.631 emacs/src/xfns.c:1.632
*** emacs/src/xfns.c:1.631      Mon Feb  7 21:31:28 2005
--- emacs/src/xfns.c    Thu Feb 17 12:49:34 2005
***************
*** 1880,1886 ****
  
    BLOCK_INPUT;
    {
!     Atom type, *atoms = 0;
      int format = 0;
      unsigned long nitems = 0;
      unsigned long bytes_after;
--- 1880,1887 ----
  
    BLOCK_INPUT;
    {
!     Atom type;
!     unsigned char *catoms;
      int format = 0;
      unsigned long nitems = 0;
      unsigned long bytes_after;
***************
*** 1889,1908 ****
                             FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols,
                             (long)0, (long)100, False, XA_ATOM,
                             &type, &format, &nitems, &bytes_after,
!                            (unsigned char **) &atoms)
         == Success)
        && format == 32 && type == XA_ATOM)
!       while (nitems > 0)
!       {
!         nitems--;
!         if (atoms[nitems] == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window)
!           need_delete = 0;
!         else if (atoms[nitems] == FRAME_X_DISPLAY_INFO 
(f)->Xatom_wm_take_focus)
!           need_focus = 0;
!         else if (atoms[nitems] == FRAME_X_DISPLAY_INFO 
(f)->Xatom_wm_save_yourself)
!           need_save = 0;
!       }
!     if (atoms) XFree ((char *) atoms);
    }
    {
      Atom props [10];
--- 1890,1916 ----
                             FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols,
                             (long)0, (long)100, False, XA_ATOM,
                             &type, &format, &nitems, &bytes_after,
!                            &catoms)
         == Success)
        && format == 32 && type == XA_ATOM)
!       {
!       Atom *atoms = (Atom *) catoms;
!       while (nitems > 0)
!         {
!           nitems--;
!           if (atoms[nitems]
!               == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window)
!             need_delete = 0;
!           else if (atoms[nitems]
!                    == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_take_focus)
!             need_focus = 0;
!           else if (atoms[nitems]
!                    == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_save_yourself)
!             need_save = 0;
!         }
!       }
!     if (catoms)
!       XFree (catoms);
    }
    {
      Atom props [10];
***************
*** 4156,4162 ****
    Atom prop_atom;
    int rc;
    Lisp_Object prop_value = Qnil;
!   char *tmp_data = NULL;
    Atom actual_type;
    Atom target_type = XA_STRING;
    int actual_format;
--- 4164,4170 ----
    Atom prop_atom;
    int rc;
    Lisp_Object prop_value = Qnil;
!   unsigned char *tmp_data = NULL;
    Atom actual_type;
    Atom target_type = XA_STRING;
    int actual_format;
***************
*** 4196,4202 ****
    rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window,
                           prop_atom, 0, 0, False, target_type,
                           &actual_type, &actual_format, &actual_size,
!                          &bytes_remaining, (unsigned char **) &tmp_data);
    if (rc == Success)
      {
        int size = bytes_remaining;
--- 4204,4210 ----
    rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window,
                           prop_atom, 0, 0, False, target_type,
                           &actual_type, &actual_format, &actual_size,
!                          &bytes_remaining, &tmp_data);
    if (rc == Success)
      {
        int size = bytes_remaining;
***************
*** 4209,4215 ****
                               ! NILP (delete_p), target_type,
                               &actual_type, &actual_format,
                               &actual_size, &bytes_remaining,
!                              (unsigned char **) &tmp_data);
        if (rc == Success && tmp_data)
          {
            /* The man page for XGetWindowProperty says:
--- 4217,4223 ----
                               ! NILP (delete_p), target_type,
                               &actual_type, &actual_format,
                               &actual_size, &bytes_remaining,
!                              &tmp_data);
        if (rc == Success && tmp_data)
          {
            /* The man page for XGetWindowProperty says:
***************
*** 4233,4246 ****
                long *ldata = (long *) tmp_data;
  
                for (i = 0; i < actual_size; ++i)
!                 idata[i]= (int) ldata[i];
              }
  
            if (NILP (vector_ret_p))
              prop_value = make_string (tmp_data, size);
            else
              prop_value = x_property_data_to_lisp (f,
!                                                   (unsigned char *) tmp_data,
                                                    actual_type,
                                                    actual_format,
                                                    actual_size);
--- 4241,4254 ----
                long *ldata = (long *) tmp_data;
  
                for (i = 0; i < actual_size; ++i)
!                 idata[i] = (int) ldata[i];
              }
  
            if (NILP (vector_ret_p))
              prop_value = make_string (tmp_data, size);
            else
              prop_value = x_property_data_to_lisp (f,
!                                                   tmp_data,
                                                    actual_type,
                                                    actual_format,
                                                    actual_size);




reply via email to

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