On Tue, Jun 28, 2011 at 10:39 PM, Mike Frysinger <[email protected]> wrote: > On Tuesday, June 28, 2011 15:36:17 Jie Zhang wrote: >> On Tue, Jun 28, 2011 at 12:45 PM, Mike Frysinger wrote: >> > as long as the default case expands into the const lookup table, this >> > looks fine to me. >> >> I don't understand this. > > that hex.c has logic: > +#if HOST_CHARSET == HOST_CHARSET_ASCII > + > +const unsigned char _hex_value[_hex_array_size] = > ... > +#else > ... build _hex_value array at runtime ... > +#endif > > the default behavior should be the first. > This is decided by the following code in include/safe-ctype.h
#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 # define HOST_CHARSET HOST_CHARSET_ASCII #else # if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \ && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A # define HOST_CHARSET HOST_CHARSET_EBCDIC # else # define HOST_CHARSET HOST_CHARSET_UNKNOWN # endif #endif I think on most modern machines, HOST_CHARSET will be defined to HOST_CHARSET_ASCII. So the const lookup table will be used. Jie ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ UrJTAG-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/urjtag-development
