[BACK]Return to main.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / vim

Diff for /src/usr.bin/vim/Attic/main.c between version 1.2 and 1.3

version 1.2, 1996/09/21 06:23:05 version 1.3, 1996/09/22 01:18:02
Line 153 
Line 153 
         int                             arg_idx = 0;                    /* index for arg_files[] */          int                             arg_idx = 0;                    /* index for arg_files[] */
         int                             check_version = FALSE;  /* check .vimrc version number */          int                             check_version = FALSE;  /* check .vimrc version number */
         int                             argv_idx;                               /* index in argv[n][] */          int                             argv_idx;                               /* index in argv[n][] */
           int             invoked_as_ex = FALSE;  /* argv[0] is "ex" */
   
 #if defined(MSDOS) || defined(WIN32) || defined(OS2)  #if defined(MSDOS) || defined(WIN32) || defined(OS2)
         static struct initmap          static struct initmap
Line 249 
Line 250 
         }          }
   
 /*  /*
    * If the executable is called "ex" we start in ex mode.
    */
   
           if (STRCMP(gettail((char_u *)argv[0]), (char_u *)"ex") == 0)
           {
                   invoked_as_ex = TRUE;
           }
   
   /*
  * If the executable is called "gvim" we run the GUI version.   * If the executable is called "gvim" we run the GUI version.
  */   */
         if (STRCMP(gettail((char_u *)argv[0]), (char_u *)"gvim") == 0)          if (STRCMP(gettail((char_u *)argv[0]), (char_u *)"gvim") == 0)
Line 863 
Line 873 
         secure = 0;          secure = 0;
   
         scroll_start();          scroll_start();
         screenclear();                                          /* clear screen */  
   
           if (!invoked_as_ex) {
                   screenclear();                                  /* clear screen */
           }
   
         no_wait_return = TRUE;          no_wait_return = TRUE;
   
         if (recoverymode)                                       /* do recover */          if (recoverymode)                                       /* do recover */
Line 899 
Line 912 
 #ifdef AUTOCMD  #ifdef AUTOCMD
                                 curwin = firstwin;                      /* start again */                                  curwin = firstwin;                      /* start again */
 #endif  #endif
                                   if (invoked_as_ex) {            /* move to end of file if running as
   ex */
                                           curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
                                   }
                         }                          }
                         mch_breakcheck();                          mch_breakcheck();
                         if (got_int)                          if (got_int)
Line 950 
Line 967 
                         curwin->w_arg_idx = arg_idx;                          curwin->w_arg_idx = arg_idx;
                         /* edit file from arg list, if there is one */                          /* edit file from arg list, if there is one */
                         (void)do_ecmd(0, arg_idx < arg_count ? arg_files[arg_idx] : NULL,                          (void)do_ecmd(0, arg_idx < arg_count ? arg_files[arg_idx] : NULL,
                                                                                   NULL, NULL, (linenr_t)1, ECMD_HIDE);                                                                                    NULL, NULL, (linenr_t)0, ECMD_HIDE);
                         if (arg_idx == arg_count - 1)                          if (arg_idx == arg_count - 1)
                                 arg_had_last = TRUE;                                  arg_had_last = TRUE;
                         ++arg_idx;                          ++arg_idx;
Line 1045 
Line 1062 
                  * If there is nothing in the stuff_buffer or do_redraw is TRUE,                   * If there is nothing in the stuff_buffer or do_redraw is TRUE,
                  * update cursor and redraw.                   * update cursor and redraw.
                  */                   */
                 if (skip_redraw)                  if (skip_redraw || invoked_as_ex)
                         skip_redraw = FALSE;                          skip_redraw = FALSE;
                 else if (do_redraw || stuff_empty())                  else if (do_redraw || stuff_empty())
                 {                  {
Line 1086 
Line 1103 
   
                         setcursor();                          setcursor();
                         cursor_on();                          cursor_on();
                   }
   
                   /*
                    * if we're invoked as ex, do a round of ex commands before
                    * going on to normal mode
                    */
   
                   if (invoked_as_ex) {
                           do_exmode();
   
                           cursupdate();
                           updateScreen(TRUE);
                           showmode();
                           setcursor();
                           cursor_on();
   
                           invoked_as_ex = FALSE;
                 }                  }
   
                 /*                  /*

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3