mojoshader_preprocessor.c
changeset 629 d886403c6609
parent 628 33da6087aa48
child 630 e6bd53dd1f91
equal deleted inserted replaced
628:33da6087aa48 629:d886403c6609
   103     unsigned int i;
   103     unsigned int i;
   104     for (i = 0; i < tokenlen; i++)
   104     for (i = 0; i < tokenlen; i++)
   105     {
   105     {
   106         if (token[i] == '\n')
   106         if (token[i] == '\n')
   107             printf("\\n");
   107             printf("\\n");
       
   108         else if (token[i] == '\\')
       
   109             printf("\\\\");
   108         else
   110         else
   109             printf("%c", token[i]);
   111             printf("%c", token[i]);
   110     } // for
   112     } // for
   111     printf("\" (");
   113     printf("\" (");
   112     switch (tokenval)
   114     switch (tokenval)
   155 
   157 
   156         case ((Token) '\n'):
   158         case ((Token) '\n'):
   157             printf("'\\n'");
   159             printf("'\\n'");
   158             break;
   160             break;
   159 
   161 
       
   162         case ((Token) '\\'):
       
   163             printf("'\\\\'");
       
   164             break;
       
   165 
   160         default:
   166         default:
   161             assert(((int)tokenval) < 256);
   167             assert(((int)tokenval) < 256);
   162             printf("'%c'", (char) tokenval);
   168             printf("'%c'", (char) tokenval);
   163             break;
   169             break;
   164     } // switch
   170     } // switch