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 / 6.0.205 < prev    next >
Encoding:
Internet Message Format  |  2002-02-09  |  5.3 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.205
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.0.205 (extra)
  11. Problem:    "gvim -f" still forks when using the batch script to start Vim.
  12. Solution:   Add an argument to "start" to use a foreground session (Michael
  13.         Geddes)
  14. Files:        src/dosinst.c
  15.  
  16.  
  17. *** ../vim60.204/src/dosinst.c    Fri Nov  2 16:20:26 2001
  18. --- src/dosinst.c    Sun Feb 10 12:55:22 2002
  19. ***************
  20. *** 740,784 ****
  21.           fprintf(fd, "goto eof\n\n");
  22.           fprintf(fd, ":havevim\n");
  23.   
  24. !         fprintf(fd, "if .%%OS%%==.Windows_NT goto ntaction\n\n");
  25. !         fprintf(fd, "rem for Win95 collect the arguments in VIMARGS\n");
  26.           fprintf(fd, "set VIMARGS=\n");
  27.           fprintf(fd, ":loopstart\n");
  28.           fprintf(fd, "if .%%1==. goto loopend\n");
  29.           fprintf(fd, "set VIMARGS=%%VIMARGS%% %%1\n");
  30.           fprintf(fd, "shift\n");
  31.           fprintf(fd, "goto loopstart\n\n");
  32.           fprintf(fd, ":loopend\n");
  33.   
  34.           /* For gvim.exe use "start" to avoid that the console window stays
  35.            * open. */
  36.           if (*exename == 'g')
  37.           fprintf(fd, "start ");
  38.   
  39.           /* Do use quotes here if the path includes a space. */
  40.           if (strchr(installdir, ' ') != NULL)
  41.           fprintf(fd, "\"%%VIM%%\\%s\" %s %%VIMARGS%%\n", buf, vimarg);
  42.           else
  43.           fprintf(fd, "%%VIM%%\\%s %s %%VIMARGS%%\n", buf, vimarg);
  44. -         fprintf(fd, "set VIMARGS=\n");
  45.           fprintf(fd, "goto eof\n\n");
  46.   
  47.           fprintf(fd, ":ntaction\n");
  48.           fprintf(fd, "rem for WinNT we can use %%*\n");
  49.   
  50.           /* For gvim.exe use "start /b" to avoid that the console window
  51.            * stays open. */
  52.           if (*exename == 'g')
  53.           fprintf(fd, "start \"dummy\" /b ");
  54.   
  55.           /* Do use quotes here if the path includes a space. */
  56.           if (strchr(installdir, ' ') != NULL)
  57.           fprintf(fd, "\"%%VIM%%\\%s\" %s %%*\n", buf, vimarg);
  58.           else
  59.           fprintf(fd, "%%VIM%%\\%s %s %%*\n", buf, vimarg);
  60.   
  61.           fprintf(fd, "\n:eof\n");
  62.   
  63.           fclose(fd);
  64.           printf("%s has been %s\n", batpath,
  65. --- 740,825 ----
  66.           fprintf(fd, "goto eof\n\n");
  67.           fprintf(fd, ":havevim\n");
  68.   
  69. !         fprintf(fd, "rem collect the arguments in VIMARGS for Win95\n");
  70.           fprintf(fd, "set VIMARGS=\n");
  71. +         if (*exename == 'g')
  72. +         fprintf(fd, "set VIMNOFORK=\n");
  73.           fprintf(fd, ":loopstart\n");
  74.           fprintf(fd, "if .%%1==. goto loopend\n");
  75. +         if (*exename == 'g')
  76. +         {
  77. +         fprintf(fd, "if NOT .%%1==.-f goto noforkarg\n");
  78. +         fprintf(fd, "set VIMNOFORK=1\n");
  79. +         fprintf(fd, ":noforkarg\n");
  80. +         }
  81.           fprintf(fd, "set VIMARGS=%%VIMARGS%% %%1\n");
  82.           fprintf(fd, "shift\n");
  83.           fprintf(fd, "goto loopstart\n\n");
  84.           fprintf(fd, ":loopend\n");
  85.   
  86. +         fprintf(fd, "if .%%OS%%==.Windows_NT goto ntaction\n\n");
  87.           /* For gvim.exe use "start" to avoid that the console window stays
  88.            * open. */
  89.           if (*exename == 'g')
  90. +         {
  91. +         fprintf(fd, "if .%%VIMNOFORK%%==.1 goto nofork\n");
  92.           fprintf(fd, "start ");
  93. +         }
  94.   
  95.           /* Do use quotes here if the path includes a space. */
  96.           if (strchr(installdir, ' ') != NULL)
  97.           fprintf(fd, "\"%%VIM%%\\%s\" %s %%VIMARGS%%\n", buf, vimarg);
  98.           else
  99.           fprintf(fd, "%%VIM%%\\%s %s %%VIMARGS%%\n", buf, vimarg);
  100.           fprintf(fd, "goto eof\n\n");
  101.   
  102. +         if (*exename == 'g')
  103. +         {
  104. +         fprintf(fd, ":nofork\n");
  105. +         fprintf(fd, "start /w ");
  106. +         /* Do use quotes here if the path includes a space. */
  107. +         if (strchr(installdir, ' ') != NULL)
  108. +             fprintf(fd, "\"%%VIM%%\\%s\" %s %%VIMARGS%%\n", buf,
  109. +                                       vimarg);
  110. +         else
  111. +             fprintf(fd, "%%VIM%%\\%s %s %%VIMARGS%%\n", buf, vimarg);
  112. +         fprintf(fd, "goto eof\n\n");
  113. +         }
  114.           fprintf(fd, ":ntaction\n");
  115.           fprintf(fd, "rem for WinNT we can use %%*\n");
  116.   
  117.           /* For gvim.exe use "start /b" to avoid that the console window
  118.            * stays open. */
  119.           if (*exename == 'g')
  120. +         {
  121. +         fprintf(fd, "if .%%VIMNOFORK%%==.1 goto noforknt\n");
  122.           fprintf(fd, "start \"dummy\" /b ");
  123. +         }
  124.   
  125.           /* Do use quotes here if the path includes a space. */
  126.           if (strchr(installdir, ' ') != NULL)
  127.           fprintf(fd, "\"%%VIM%%\\%s\" %s %%*\n", buf, vimarg);
  128.           else
  129.           fprintf(fd, "%%VIM%%\\%s %s %%*\n", buf, vimarg);
  130. +         fprintf(fd, "goto eof\n\n");
  131. +         if (*exename == 'g')
  132. +         {
  133. +         fprintf(fd, ":noforknt\n");
  134. +         fprintf(fd, "start \"dummy\" /b /wait ");
  135. +         /* Do use quotes here if the path includes a space. */
  136. +         if (strchr(installdir, ' ') != NULL)
  137. +             fprintf(fd, "\"%%VIM%%\\%s\" %s %%*\n", buf, vimarg);
  138. +         else
  139. +             fprintf(fd, "%%VIM%%\\%s %s %%*\n", buf, vimarg);
  140. +         }
  141.   
  142.           fprintf(fd, "\n:eof\n");
  143. +         fprintf(fd, "set VIMARGS=\n");
  144. +         if (*exename == 'g')
  145. +         fprintf(fd, "set VIMNOFORK=\n");
  146.   
  147.           fclose(fd);
  148.           printf("%s has been %s\n", batpath,
  149. *** ../vim60.204/src/version.c    Sun Feb 10 12:52:47 2002
  150. --- src/version.c    Sun Feb 10 12:50:17 2002
  151. ***************
  152. *** 608,609 ****
  153. --- 608,611 ----
  154.   {   /* Add new patch number below this line */
  155. + /**/
  156. +     205,
  157.   /**/
  158.  
  159. -- 
  160. Veni, Vidi, Video -- I came, I saw, I taped what I saw.
  161.  
  162.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  163. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  164.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  165.