For reasons I totally disagree with, but "The Powers (of Anti-Usability), which will continue, despite my objections, I have a sorting procedure that makes the base strcmp () compare with sorting by its name "It works fine; it's hard to understand that this is wrong. However, at 11 o'clock it was decided that entries starting with a number should come after entries starting with a letter, contrary to the ASCII order. They quote that the EBCDIC standard has the numbers of the following letters, so the preliminary assumption is not universal truth, and I do not have the power to win this argument ... but I digress.
That is my problem. I replaced all the relevant strcmp references with a new nonstd_strcmp function call, and now you need to implement modifications to make the sort change. I used the source of FreeBSD as a base: http://freebsd.active-venture.com/FreeBSD-srctree/newsrc/libkern/strncmp.c.html
if (n == 0) return (0); do { if (*s1 != *s2++) return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1)); if (*s1++ == 0) break; } while (--n != 0); return (0);
I think it may take some time for me to really think about how this should be done, but I am sure that I am not the only one who has experienced mental death from specification changes just prior to release.
c ++ c strcmp lexicographic
Aaron burke
source share