[SCM] Vim packaging branch, deb/vim-tiny, updated. upstream/7.2.130-192-g463cd99

James Vega jamessan at debian.org
Fri Nov 6 05:18:38 UTC 2009


The following commit has been merged in the deb/vim-tiny branch:
commit 463cd99c19e1daa217bef68c6f16626a99ac2549
Merge: d39a68425fc3049956e3d7a9ca82370787060524 ab3689861ec955506e6286728363317e4865bb3f
Author: James Vega <jamessan at debian.org>
Date:   Thu Nov 5 20:34:40 2009 -0500

    Merge branch 'upstream' into deb/vim-tiny

diff --combined src/main.c
index 4f159dc,5bb81a6..912433c
--- a/src/main.c
+++ b/src/main.c
@@@ -87,9 -87,6 +87,9 @@@ typedef struc
  #ifdef FEAT_DIFF
      int		diff_mode;		/* start with 'diff' set */
  #endif
 +#ifdef SYS_TINYRC_FILE
 +    int		vi_mode;		/* started as "vi" */
 +#endif
  } mparm_T;
  
  /* Values for edit_type. */
@@@ -133,10 -130,6 +133,6 @@@ static char_u *serverMakeName __ARGS((c
  #endif
  
  
- #ifdef STARTUPTIME
- static FILE *time_fd = NULL;
- #endif
- 
  /*
   * Different types of error messages.
   */
@@@ -176,6 -169,9 +172,9 @@@ mai
      char_u	*fname = NULL;		/* file name from command line */
      mparm_T	params;			/* various parameters passed between
  					 * main() and other functions. */
+ #ifdef STARTUPTIME
+     int		i;
+ #endif
  
      /*
       * Do any system-specific initialisations.  These can NOT use IObuff or
@@@ -206,8 -202,15 +205,15 @@@
  #endif
  
  #ifdef STARTUPTIME
-     time_fd = mch_fopen(STARTUPTIME, "a");
-     TIME_MSG("--- VIM STARTING ---");
+     for (i = 1; i < argc; ++i)
+     {
+ 	if (STRNICMP(argv[i], "--startuptime=", 14) == 0)
+ 	{
+ 	    time_fd = mch_fopen(argv[i] + 14, "a");
+ 	    TIME_MSG("--- VIM STARTING ---");
+ 	    break;
+ 	}
+     }
  #endif
      starttime = time(NULL);
  
@@@ -1153,6 -1156,18 +1159,18 @@@ main_loop(cmdwin, noexmode
  	    cursor_on();
  
  	    do_redraw = FALSE;
+ 
+ #ifdef STARTUPTIME
+ 	    /* Now that we have drawn the first screen all the startup stuff
+ 	     * has been done, close any file for startup messages. */
+ 	    if (time_fd != NULL)
+ 	    {
+ 		TIME_MSG("first screen update");
+ 		TIME_MSG("--- VIM STARTED ---");
+ 		fclose(time_fd);
+ 		time_fd = NULL;
+ 	    }
+ #endif
  	}
  #ifdef FEAT_GUI
  	if (need_mouse_correct)
@@@ -1485,10 -1500,6 +1503,10 @@@ parse_command_name(parmp
      }
      else if (STRNICMP(initstr, "vim", 3) == 0)
  	initstr += 3;
 +#ifdef SYS_TINYRC_FILE
 +    else if (STRNICMP(initstr, "vi", 2) == 0)
 +	parmp->vi_mode = TRUE;
 +#endif
  
      /* Catch "[r][g]vimdiff" and "[r][g]viewdiff". */
      if (STRICMP(initstr, "diff") == 0)
@@@ -1750,6 -1761,10 +1768,10 @@@ command_line_scan(parmp
  		    /* already processed, skip */
  		}
  #endif
+ 		else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0)
+ 		{
+ 		    /* already processed, skip */
+ 		}
  		else
  		{
  		    if (argv[0][argv_idx])
@@@ -2778,12 -2793,7 +2800,12 @@@ source_startup_scripts(parmp
  	 * Get system wide defaults, if the file name is defined.
  	 */
  #ifdef SYS_VIMRC_FILE
 -	(void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE);
 +# if defined(SYS_TINYRC_FILE) && defined(TINY_VIMRC)
 +	if (parmp->vi_mode)
 +	    (void)do_source((char_u *)SYS_TINYRC_FILE, FALSE, DOSO_NONE);
 +	else
 +# endif
 +	    (void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE);
  #endif
  #ifdef MACOS_X
  	(void)do_source((char_u *)"$VIMRUNTIME/macmap.vim", FALSE, DOSO_NONE);
@@@ -3223,6 -3233,20 +3245,20 @@@ static void time_diff __ARGS((struct ti
  
  static struct timeval	prev_timeval;
  
+ # ifdef WIN3264
+ /*
+  * Windows doesn't have gettimeofday(), although it does have struct timeval.
+  */
+     static int
+ gettimeofday(struct timeval *tv, char *dummy)
+ {
+     long t = clock();
+     tv->tv_sec = t / CLOCKS_PER_SEC;
+     tv->tv_usec = (t - tv->tv_sec * CLOCKS_PER_SEC) * 1000000 / CLOCKS_PER_SEC;
+     return 0;
+ }
+ # endif
+ 
  /*
   * Save the previous time before doing something that could nest.
   * set "*tv_rel" to the time elapsed so far.
@@@ -3311,20 -3335,6 +3347,6 @@@ time_msg(msg, tv_start
      }
  }
  
- # ifdef WIN3264
- /*
-  * Windows doesn't have gettimeofday(), although it does have struct timeval.
-  */
-     int
- gettimeofday(struct timeval *tv, char *dummy)
- {
-     long t = clock();
-     tv->tv_sec = t / CLOCKS_PER_SEC;
-     tv->tv_usec = (t - tv->tv_sec * CLOCKS_PER_SEC) * 1000000 / CLOCKS_PER_SEC;
-     return 0;
- }
- # endif
- 
  #endif
  
  #if defined(FEAT_CLIENTSERVER) || defined(PROTO)

-- 
Vim packaging



More information about the pkg-vim-maintainers mailing list