/[svn]/linuxsampler/trunk/src/network/lscp.y
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscp.y

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

revision 1398 by schoenebeck, Sun Oct 7 14:05:04 2007 UTC revision 1399 by schoenebeck, Thu Oct 11 18:53:29 2007 UTC
# Line 101  int octalsToNumber(char oct_digit0, char Line 101  int octalsToNumber(char oct_digit0, char
101      return atoi(d2)*8*8 + atoi(d1)*8 + atoi(d0);      return atoi(d2)*8*8 + atoi(d1)*8 + atoi(d0);
102  }  }
103    
 int hexToNumber(char hex_digit) {  
     switch (hex_digit) {  
         case '0': return 0;  
         case '1': return 1;  
         case '2': return 2;  
         case '3': return 3;  
         case '4': return 4;  
         case '5': return 5;  
         case '6': return 6;  
         case '7': return 7;  
         case '8': return 8;  
         case '9': return 9;  
         // grammar rule 'digit_hex' already forced lower case  
         case 'a': return 10;  
         case 'b': return 11;  
         case 'c': return 12;  
         case 'd': return 13;  
         case 'e': return 14;  
         case 'f': return 15;  
         default:  return 0;  
     }  
 }  
   
 int hexsToNumber(char hex_digit0, char hex_digit1 = '0') {  
     return hexToNumber(hex_digit1)*16 + hexToNumber(hex_digit0);  
 }  
   
104  %}  %}
105    
106  // reentrant parser  // reentrant parser

Legend:
Removed from v.1398  
changed lines
  Added in v.1399

  ViewVC Help
Powered by ViewVC