home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / old / 5.4.x2 < prev    next >
Encoding:
Internet Message Format  |  1999-08-11  |  3.1 KB

  1. To: Will Day <willday@rom.oit.gatech.edu>
  2. Cc: VIM Development Mailing List <vim-dev@vim.org>
  3. Subject: patch 5.4.x2 (was: patch: BeOS paste/acquire_sem_etc() problems)
  4. In-Reply-To: <19990808053119.A7947@rom.oit.gatech.edu>
  5. Fcc: outbox
  6. From: Bram Moolenaar <Bram@moolenaar.net>
  7. ------------
  8.  
  9. Will Day wrote:
  10.  
  11. > Attached is a patch to fix a problem I've been having with pasting in vim
  12. > 5.4 under BeOS R4.5/x86.
  13.  
  14. Thanks for fixing this.  I was already wondering if someone was using Vim on
  15. BeOS these days.
  16.  
  17. Since os_beos.c is in the extra archive, this will be an "x" patch.
  18.  
  19.  
  20. Patch 5.4.x2
  21. Problem:    BeOS: When pasting text, one character was moved to the end.
  22. Solution:   Re-enable the BeOS code in fill_input_buf(), and fix timing out
  23.         with acquire_sem_etc(). (Will Day)
  24. Files:        src/os_beos.c, src/ui.c
  25.  
  26.  
  27. *** ../vim-5.4/src/os_beos.c    Sun Jul 25 22:02:17 1999
  28. --- src/os_beos.c    Sun Aug  8 14:04:49 1999
  29. ***************
  30. *** 186,198 ****
  31.           if (tmo == 0)
  32.           tmo = 1.0;
  33.       } else {
  34. -         tmo = B_INFINITE_TIMEOUT;
  35.           check_for_bebox();
  36.       }
  37.   #if TRY_ABORT
  38.       release_sem(character_wanted);
  39.   #endif
  40. !     acquired = acquire_sem_etc(character_present, 1, B_TIMEOUT, tmo);
  41.       if (acquired == B_NO_ERROR) {
  42.           if (charcount > 0) {
  43.           add_to_input_buf(&charbuf, 1);
  44. --- 186,200 ----
  45.           if (tmo == 0)
  46.           tmo = 1.0;
  47.       } else {
  48.           check_for_bebox();
  49.       }
  50.   #if TRY_ABORT
  51.       release_sem(character_wanted);
  52.   #endif
  53. !     if (timeout)
  54. !         acquired = acquire_sem_etc(character_present, 1, B_TIMEOUT, tmo);
  55. !     else
  56. !         acquired = acquire_sem(character_present);
  57.       if (acquired == B_NO_ERROR) {
  58.           if (charcount > 0) {
  59.           add_to_input_buf(&charbuf, 1);
  60. *** ../vim-5.4/src/ui.c    Sun Jul 25 22:02:19 1999
  61. --- src/ui.c    Sun Aug  8 13:53:18 1999
  62. ***************
  63. *** 1245,1261 ****
  64.        * If we can't get any, and there isn't any in the buffer, we give up and
  65.        * exit Vim.
  66.        */
  67. ! /* make sure we have all macros defined... */
  68. ! # if defined(__BEOS__)
  69. ! #  ifndef B_BEOS_VERSION_4_5
  70. ! #   define B_BEOS_VERSION 4_5 0x0450
  71. ! #  endif
  72. ! # endif
  73. ! /* Genki (R4.5) doesn't seem to like the following (exits immediately on
  74. !  * startup)
  75. !  * richard@whitequeen.com Jul 99
  76. !  */
  77. ! # if defined(__BEOS__) && B_BEOS_VERSION < B_BEOS_VERSION_4_5
  78.       /*
  79.        * On the BeBox version (for now), all input is secretly performed within
  80.        * beos_select() which is called from RealWaitForChar().
  81. --- 1245,1251 ----
  82.        * If we can't get any, and there isn't any in the buffer, we give up and
  83.        * exit Vim.
  84.        */
  85. ! # ifdef __BEOS__
  86.       /*
  87.        * On the BeBox version (for now), all input is secretly performed within
  88.        * beos_select() which is called from RealWaitForChar().
  89.  
  90. --
  91. DENNIS: Look,  strange women lying on their backs in ponds handing out
  92.         swords ... that's no basis for a system of government.  Supreme
  93.         executive power derives from a mandate from the masses, not from some
  94.         farcical aquatic ceremony.
  95.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  96.  
  97. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  98.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  99.