emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/w32select.c
Date: Fri, 04 Apr 2003 01:24:10 -0500

Index: emacs/src/w32select.c
diff -c emacs/src/w32select.c:1.27 emacs/src/w32select.c:1.28
*** emacs/src/w32select.c:1.27  Fri Sep  6 05:04:56 2002
--- emacs/src/w32select.c       Mon Oct 14 07:01:49 2002
***************
*** 1,6 ****
  /* Selection processing for Emacs on the Microsoft W32 API.
     Copyright (C) 1993, 1994 Free Software Foundation.
!    
  This file is part of GNU Emacs.
  
  GNU Emacs is free software; you can redistribute it and/or modify
--- 1,6 ----
  /* Selection processing for Emacs on the Microsoft W32 API.
     Copyright (C) 1993, 1994 Free Software Foundation.
! 
  This file is part of GNU Emacs.
  
  GNU Emacs is free software; you can redistribute it and/or modify
***************
*** 57,72 ****
       Lisp_Object frame;
  {
    BOOL ok = FALSE;
!   
    if (!NILP (frame))
      CHECK_LIVE_FRAME (frame);
!   
    BLOCK_INPUT;
!   
    ok = OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? 
FRAME_W32_WINDOW (XFRAME (frame)) : NULL);
!   
    UNBLOCK_INPUT;
!   
    return (ok ? frame : Qnil);
  }
  
--- 57,72 ----
       Lisp_Object frame;
  {
    BOOL ok = FALSE;
! 
    if (!NILP (frame))
      CHECK_LIVE_FRAME (frame);
! 
    BLOCK_INPUT;
! 
    ok = OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? 
FRAME_W32_WINDOW (XFRAME (frame)) : NULL);
! 
    UNBLOCK_INPUT;
! 
    return (ok ? frame : Qnil);
  }
  
***************
*** 77,89 ****
       ()
  {
    BOOL ok = FALSE;
!   
    BLOCK_INPUT;
!   
    ok = EmptyClipboard ();
!   
    UNBLOCK_INPUT;
!   
    return (ok ? Qt : Qnil);
  }
  
--- 77,89 ----
       ()
  {
    BOOL ok = FALSE;
! 
    BLOCK_INPUT;
! 
    ok = EmptyClipboard ();
! 
    UNBLOCK_INPUT;
! 
    return (ok ? Qt : Qnil);
  }
  
***************
*** 93,105 ****
       ()
  {
    BOOL ok = FALSE;
!   
    BLOCK_INPUT;
!   
    ok = CloseClipboard ();
!   
    UNBLOCK_INPUT;
!   
    return (ok ? Qt : Qnil);
  }
  
--- 93,105 ----
       ()
  {
    BOOL ok = FALSE;
! 
    BLOCK_INPUT;
! 
    ok = CloseClipboard ();
! 
    UNBLOCK_INPUT;
! 
    return (ok ? Qt : Qnil);
  }
  
***************
*** 119,128 ****
    unsigned char *dst;
  
    CHECK_STRING (string);
!   
    if (!NILP (frame))
      CHECK_LIVE_FRAME (frame);
!   
    BLOCK_INPUT;
  
    nbytes = SBYTES (string) + 1;
--- 119,128 ----
    unsigned char *dst;
  
    CHECK_STRING (string);
! 
    if (!NILP (frame))
      CHECK_LIVE_FRAME (frame);
! 
    BLOCK_INPUT;
  
    nbytes = SBYTES (string) + 1;
***************
*** 159,165 ****
  
        if ((dst = (unsigned char *) GlobalLock (htext)) == NULL)
          goto error;
!     
        /* convert to CRLF line endings expected by clipboard */
        while (1)
          {
--- 159,165 ----
  
        if ((dst = (unsigned char *) GlobalLock (htext)) == NULL)
          goto error;
! 
        /* convert to CRLF line endings expected by clipboard */
        while (1)
          {
***************
*** 176,187 ****
                next[-1] = '\r';
                next[0] = '\n';
                dst = next + 1;
!             }     
            else
              /* copied remaining partial line -> now finished */
              break;
          }
!     
        GlobalUnlock (htext);
  
        Vlast_coding_system_used = Qraw_text;
--- 176,187 ----
                next[-1] = '\r';
                next[0] = '\n';
                dst = next + 1;
!             }
            else
              /* copied remaining partial line -> now finished */
              break;
          }
! 
        GlobalUnlock (htext);
  
        Vlast_coding_system_used = Qraw_text;
***************
*** 237,254 ****
        if (htext2 != NULL) htext = htext2;
        }
    }
!   
    if (!OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? 
FRAME_W32_WINDOW (XFRAME (frame)) : NULL))
      goto error;
  
    ok = EmptyClipboard () && SetClipboardData (CF_TEXT, htext);
!   
    CloseClipboard ();
!   
    if (ok) goto done;
  
   error:
!   
    ok = FALSE;
    if (htext) GlobalFree (htext);
    if (last_clipboard_text)
--- 237,254 ----
        if (htext2 != NULL) htext = htext2;
        }
    }
! 
    if (!OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? 
FRAME_W32_WINDOW (XFRAME (frame)) : NULL))
      goto error;
  
    ok = EmptyClipboard () && SetClipboardData (CF_TEXT, htext);
! 
    CloseClipboard ();
! 
    if (ok) goto done;
  
   error:
! 
    ok = FALSE;
    if (htext) GlobalFree (htext);
    if (last_clipboard_text)
***************
*** 256,262 ****
  
   done:
    UNBLOCK_INPUT;
!   
    return (ok ? string : Qnil);
  }
  
--- 256,262 ----
  
   done:
    UNBLOCK_INPUT;
! 
    return (ok ? string : Qnil);
  }
  
***************
*** 268,282 ****
  {
    HANDLE htext;
    Lisp_Object ret = Qnil;
!   
    if (!NILP (frame))
      CHECK_LIVE_FRAME (frame);
!   
    BLOCK_INPUT;
!   
    if (!OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? 
FRAME_W32_WINDOW (XFRAME (frame)) : NULL))
      goto done;
!   
    if ((htext = GetClipboardData (CF_TEXT)) == NULL)
      goto closeclip;
  
--- 268,282 ----
  {
    HANDLE htext;
    Lisp_Object ret = Qnil;
! 
    if (!NILP (frame))
      CHECK_LIVE_FRAME (frame);
! 
    BLOCK_INPUT;
! 
    if (!OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? 
FRAME_W32_WINDOW (XFRAME (frame)) : NULL))
      goto done;
! 
    if ((htext = GetClipboardData (CF_TEXT)) == NULL)
      goto closeclip;
  
***************
*** 286,295 ****
      int nbytes;
      int truelen;
      int require_decoding = 0;
!     
      if ((src = (unsigned char *) GlobalLock (htext)) == NULL)
        goto closeclip;
!     
      nbytes = strlen (src);
  
      /* If the text in clipboard is identical to what we put there
--- 286,295 ----
      int nbytes;
      int truelen;
      int require_decoding = 0;
! 
      if ((src = (unsigned char *) GlobalLock (htext)) == NULL)
        goto closeclip;
! 
      nbytes = strlen (src);
  
      /* If the text in clipboard is identical to what we put there
***************
*** 397,406 ****
  
   closeclip:
    CloseClipboard ();
!   
   done:
    UNBLOCK_INPUT;
!   
    return (ret);
  }
  
--- 397,406 ----
  
   closeclip:
    CloseClipboard ();
! 
   done:
    UNBLOCK_INPUT;
! 
    return (ret);
  }
  
***************
*** 442,448 ****
    return Qnil;
  }
  
! void 
  syms_of_w32select ()
  {
  #if 0
--- 442,448 ----
    return Qnil;
  }
  
! void
  syms_of_w32select ()
  {
  #if 0
***************
*** 457,464 ****
    DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system,
               doc: /* Coding system for communicating with other programs.
  When sending or receiving text via cut_buffer, selection, and clipboard,
! the text is encoded or decoded by this coding system.  */);
!   Vselection_coding_system=intern ("iso-latin-1-dos");
  
    DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system,
               doc: /* Coding system for the next communication with other 
programs.
--- 457,465 ----
    DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system,
               doc: /* Coding system for communicating with other programs.
  When sending or receiving text via cut_buffer, selection, and clipboard,
! the text is encoded or decoded by this coding system.
! The default value is `iso-latin-1-dos'.  */);
!   Vselection_coding_system = intern ("iso-latin-1-dos");
  
    DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system,
               doc: /* Coding system for the next communication with other 
programs.




reply via email to

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