/[grub]/grub/stage2/stage2.c
ViewVC logotype

Diff of /grub/stage2/stage2.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.39 by okuji, Sun Oct 27 23:59:53 2002 UTC revision 1.40 by okuji, Fri Nov 29 20:39:24 2002 UTC
# Line 762  get_line_from_config (char *cmdline, int Line 762  get_line_from_config (char *cmdline, int
762            if (! read_from_preset_menu (&c, 1))            if (! read_from_preset_menu (&c, 1))
763              break;              break;
764          }          }
765          
766        /* translate characters first! */        /* Skip all carriage returns.  */
       if (c == '\\' && ! literal)  
         {  
           literal = 1;  
           continue;  
         }  
767        if (c == '\r')        if (c == '\r')
768          continue;          continue;
769        if ((c == '\t') || (literal && (c == '\n')))  
770          /* Replace tabs with spaces.  */
771          if (c == '\t')
772          c = ' ';          c = ' ';
773    
774        literal = 0;        /* The previous is a backslash, then...  */
775          if (literal)
776            {
777              /* If it is a newline, replace it with a space and continue.  */
778              if (c == '\n')
779                {
780                  c = ' ';
781                  
782                  /* Go back to overwrite a backslash.  */
783                  if (pos > 0)
784                    pos--;
785                }
786                
787              literal = 0;
788            }
789              
790          /* translate characters first! */
791          if (c == '\\' && ! literal)
792            literal = 1;
793    
794        if (comment)        if (comment)
795          {          {

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26