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

Diff for /src/usr.bin/mg/main.c between version 1.64 and 1.65

version 1.64, 2012/04/12 04:47:59 version 1.65, 2012/05/25 05:05:48
Line 98 
Line 98 
          */           */
         update();          update();
   
         /* user startup file */  
         if ((cp = startupfile(NULL)) != NULL)  
                 (void)load(cp);  
   
         /*          /*
          * Create scratch buffer now, killing old *init* buffer.           * Create scratch buffer now, killing old *init* buffer.
          * This causes *scratch* to be created and made curbp,           * This causes *scratch* to be created and made curbp.
          * ensuring default modes are inherited from the startup  
          * file correctly  
          */           */
   
         if ((bp = bfind("*init*", FALSE)) != NULL)          if ((bp = bfind("*init*", FALSE)) != NULL)
                 killbuffer(bp);                  killbuffer(bp);
   
           /* user startup file. */
           if ((cp = startupfile(NULL)) != NULL)
                   (void)load(cp);
   
           /*
            * Now ensure any default buffer modes from the startup file are
            * given to any files opened when parsing the startup file.
            * Note *scratch* will also be updated.
            */
           for (bp = bheadp; bp != NULL; bp = bp->b_bufp) {
                   bp->b_flag = defb_flag;
                   for (i = 0; i <= defb_nmodes; i++) {
                           bp->b_modes[i] = defb_modes[i];
                   }
           }
   
         /* Force FFOTHARG=1 so that this mode is enabled, not simply toggled */          /* Force FFOTHARG=1 so that this mode is enabled, not simply toggled */
         if (init_fcn)          if (init_fcn)

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65