GCC Wikia
Advertisement

このページを編集する際は,編集に関する方針に従ってください.[]

概要[]

引数[]

実装[]

158: void
159: hex_init (void)
160: {
 HOST_CHARSETがASCIIならばすでに_hex_value[]が初期化されている
161: #ifndef HEX_TABLE_INITIALIZED
162:   int i;
163: 
164:   for (i=0; i<_hex_array_size; i++)
165:     {
166:       switch (i)
167:         {
168:         case '0': _hex_value[i] = 0; break;
169:         case '1': _hex_value[i] = 1; break;
170:         case '2': _hex_value[i] = 2; break;
171:         case '3': _hex_value[i] = 3; break;
172:         case '4': _hex_value[i] = 4; break;
173:         case '5': _hex_value[i] = 5; break;
174:         case '6': _hex_value[i] = 6; break;
175:         case '7': _hex_value[i] = 7; break;
176:         case '8': _hex_value[i] = 8; break;
177:         case '9': _hex_value[i] = 9; break;
178: 
179:         case 'a': case 'A': _hex_value[i] = 10; break;
180:         case 'b': case 'B': _hex_value[i] = 11; break;
181:         case 'c': case 'C': _hex_value[i] = 12; break;
182:         case 'd': case 'D': _hex_value[i] = 13; break;
183:         case 'e': case 'E': _hex_value[i] = 14; break;
184:         case 'f': case 'F': _hex_value[i] = 15; break;
185: 
186:         default:
187:           _hex_value[i] = _hex_bad;
188:           break;
189:         }
190:     }
191: #endif
192: }


リンク元

Advertisement