emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/src/w32xfns.c
Date: Tue, 04 Feb 2003 09:03:50 -0500

Index: emacs/src/w32xfns.c
diff -c emacs/src/w32xfns.c:1.19 emacs/src/w32xfns.c:1.20
*** emacs/src/w32xfns.c:1.19    Tue Feb  6 17:19:23 2001
--- emacs/src/w32xfns.c Tue Feb  4 09:03:17 2003
***************
*** 38,44 ****
  HANDLE input_available = NULL;
  HANDLE interrupt_handle = NULL;
  
! void 
  init_crit ()
  {
    InitializeCriticalSection (&critsect);
--- 38,44 ----
  HANDLE input_available = NULL;
  HANDLE interrupt_handle = NULL;
  
! void
  init_crit ()
  {
    InitializeCriticalSection (&critsect);
***************
*** 56,62 ****
    interrupt_handle = CreateEvent (NULL, TRUE, FALSE, NULL);
  }
  
! void 
  delete_crit ()
  {
    DeleteCriticalSection (&critsect);
--- 56,62 ----
    interrupt_handle = CreateEvent (NULL, TRUE, FALSE, NULL);
  }
  
! void
  delete_crit ()
  {
    DeleteCriticalSection (&critsect);
***************
*** 160,192 ****
  int_msg *lpTail = NULL;
  int nQueue = 0;
  
! BOOL 
  get_next_msg (lpmsg, bWait)
       W32Msg * lpmsg;
       BOOL bWait;
  {
    BOOL bRet = FALSE;
!   
    enter_crit ();
!   
    /* The while loop takes care of multiple sets */
!   
    while (!nQueue && bWait)
      {
        leave_crit ();
        WaitForSingleObject (input_available, INFINITE);
        enter_crit ();
      }
!   
    if (nQueue)
      {
        bcopy (&(lpHead->w32msg), lpmsg, sizeof (W32Msg));
  
        {
        int_msg * lpCur = lpHead;
!           
        lpHead = lpHead->lpNext;
!           
        myfree (lpCur);
        }
  
--- 160,192 ----
  int_msg *lpTail = NULL;
  int nQueue = 0;
  
! BOOL
  get_next_msg (lpmsg, bWait)
       W32Msg * lpmsg;
       BOOL bWait;
  {
    BOOL bRet = FALSE;
! 
    enter_crit ();
! 
    /* The while loop takes care of multiple sets */
! 
    while (!nQueue && bWait)
      {
        leave_crit ();
        WaitForSingleObject (input_available, INFINITE);
        enter_crit ();
      }
! 
    if (nQueue)
      {
        bcopy (&(lpHead->w32msg), lpmsg, sizeof (W32Msg));
  
        {
        int_msg * lpCur = lpHead;
! 
        lpHead = lpHead->lpNext;
! 
        myfree (lpCur);
        }
  
***************
*** 197,209 ****
  
    if (nQueue == 0)
      ResetEvent (input_available);
!   
    leave_crit ();
!   
    return (bRet);
  }
  
! BOOL 
  post_msg (lpmsg)
       W32Msg * lpmsg;
  {
--- 197,209 ----
  
    if (nQueue == 0)
      ResetEvent (input_available);
! 
    leave_crit ();
! 
    return (bRet);
  }
  
! BOOL
  post_msg (lpmsg)
       W32Msg * lpmsg;
  {
***************
*** 221,234 ****
      {
        lpTail->lpNext = lpNew;
      }
!   else 
      {
        lpHead = lpNew;
      }
  
    lpTail = lpNew;
    SetEvent (input_available);
!     
    leave_crit ();
  
    return (TRUE);
--- 221,234 ----
      {
        lpTail->lpNext = lpNew;
      }
!   else
      {
        lpHead = lpNew;
      }
  
    lpTail = lpNew;
    SetEvent (input_available);
! 
    leave_crit ();
  
    return (TRUE);
***************
*** 277,283 ****
   *   It returns a bitmask that indicates which of the four values
   *   were actually found in the string.  For each value found,
   *   the corresponding argument is updated;  for each value
!  *   not found, the corresponding argument is left unchanged. 
   */
  
  static int
--- 277,283 ----
   *   It returns a bitmask that indicates which of the four values
   *   were actually found in the string.  For each value found,
   *   the corresponding argument is updated;  for each value
!  *   not found, the corresponding argument is left unchanged.
   */
  
  static int
***************
*** 287,293 ****
  {
    register int Result = 0;
    int Sign = 1;
!   
    if (*string == '+')
      string++;
    else if (*string == '-')
--- 287,293 ----
  {
    register int Result = 0;
    int Sign = 1;
! 
    if (*string == '+')
      string++;
    else if (*string == '-')
***************
*** 306,312 ****
      return (-Result);
  }
  
! int 
  XParseGeometry (string, x, y, width, height)
       char *string;
       int *x, *y;
--- 306,312 ----
      return (-Result);
  }
  
! int
  XParseGeometry (string, x, y, width, height)
       char *string;
       int *x, *y;
***************
*** 317,339 ****
    unsigned int tempWidth, tempHeight;
    int tempX, tempY;
    char *nextCharacter;
!   
    if ((string == NULL) || (*string == '\0')) return (mask);
    if (*string == '=')
      string++;  /* ignore possible '=' at beg of geometry spec */
!   
    strind = (char *)string;
!   if (*strind != '+' && *strind != '-' && *strind != 'x') 
      {
        tempWidth = read_integer (strind, &nextCharacter);
!       if (strind == nextCharacter) 
        return (0);
        strind = nextCharacter;
        mask |= WidthValue;
      }
!   
!   if (*strind == 'x' || *strind == 'X') 
!     { 
        strind++;
        tempHeight = read_integer (strind, &nextCharacter);
        if (strind == nextCharacter)
--- 317,339 ----
    unsigned int tempWidth, tempHeight;
    int tempX, tempY;
    char *nextCharacter;
! 
    if ((string == NULL) || (*string == '\0')) return (mask);
    if (*string == '=')
      string++;  /* ignore possible '=' at beg of geometry spec */
! 
    strind = (char *)string;
!   if (*strind != '+' && *strind != '-' && *strind != 'x')
      {
        tempWidth = read_integer (strind, &nextCharacter);
!       if (strind == nextCharacter)
        return (0);
        strind = nextCharacter;
        mask |= WidthValue;
      }
! 
!   if (*strind == 'x' || *strind == 'X')
!     {
        strind++;
        tempHeight = read_integer (strind, &nextCharacter);
        if (strind == nextCharacter)
***************
*** 341,350 ****
        strind = nextCharacter;
        mask |= HeightValue;
      }
!   
!   if ((*strind == '+') || (*strind == '-')) 
      {
!       if (*strind == '-') 
        {
          strind++;
          tempX = -read_integer (strind, &nextCharacter);
--- 341,350 ----
        strind = nextCharacter;
        mask |= HeightValue;
      }
! 
!   if ((*strind == '+') || (*strind == '-'))
      {
!       if (*strind == '-')
        {
          strind++;
          tempX = -read_integer (strind, &nextCharacter);
***************
*** 355,361 ****
  
        }
        else
!       {       
          strind++;
          tempX = read_integer (strind, &nextCharacter);
          if (strind == nextCharacter)
--- 355,361 ----
  
        }
        else
!       {
          strind++;
          tempX = read_integer (strind, &nextCharacter);
          if (strind == nextCharacter)
***************
*** 363,371 ****
          strind = nextCharacter;
        }
        mask |= XValue;
!       if ((*strind == '+') || (*strind == '-')) 
        {
!         if (*strind == '-') 
            {
              strind++;
              tempY = -read_integer (strind, &nextCharacter);
--- 363,371 ----
          strind = nextCharacter;
        }
        mask |= XValue;
!       if ((*strind == '+') || (*strind == '-'))
        {
!         if (*strind == '-')
            {
              strind++;
              tempY = -read_integer (strind, &nextCharacter);
***************
*** 386,397 ****
          mask |= YValue;
        }
      }
!   
    /* If strind isn't at the end of the string the it's an invalid
       geometry specification. */
!   
    if (*strind != '\0') return (0);
!   
    if (mask & XValue)
      *x = tempX;
    if (mask & YValue)
--- 386,397 ----
          mask |= YValue;
        }
      }
! 
    /* If strind isn't at the end of the string the it's an invalid
       geometry specification. */
! 
    if (*strind != '\0') return (0);
! 
    if (mask & XValue)
      *x = tempX;
    if (mask & YValue)




reply via email to

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