version 1.2, 2015/03/18 22:39:41 |
version 1.3, 2015/03/18 22:53:27 |
|
|
tmp = nl_langinfo(item[i]); |
tmp = nl_langinfo(item[i]); |
if (debug_sort) |
if (debug_sort) |
printf("month[%d]=%s\n", i, tmp); |
printf("month[%d]=%s\n", i, tmp); |
len = strlen(tmp); |
if (*tmp == '\0') |
if (len < 1) |
|
continue; |
continue; |
while (isblank((unsigned char)*tmp)) |
m = sort_strdup(tmp); |
++tmp; |
|
m = sort_malloc(len + 1); |
|
memcpy(m, tmp, len + 1); |
|
m[len] = '\0'; |
|
for (j = 0; j < len; j++) |
for (j = 0; j < len; j++) |
m[j] = toupper(m[j]); |
m[j] = toupper(m[j]); |
cmonths[i] = m; |
cmonths[i] = m; |
|
|
tmp = nl_langinfo(item[i]); |
tmp = nl_langinfo(item[i]); |
if (debug_sort) |
if (debug_sort) |
printf("month[%d]=%s\n", i, tmp); |
printf("month[%d]=%s\n", i, tmp); |
len = strlen(tmp); |
if (*tmp == '\0') |
if (len < 1) |
|
continue; |
continue; |
while (isblank((unsigned char)*tmp)) |
len = strlen(tmp); |
++tmp; |
|
m = sort_malloc(SIZEOF_WCHAR_STRING(len + 1)); |
m = sort_malloc(SIZEOF_WCHAR_STRING(len + 1)); |
if (mbstowcs(m, tmp, len) == (size_t)-1) |
if (mbstowcs(m, tmp, len) == (size_t)-1) { |
|
sort_free(m); |
continue; |
continue; |
|
} |
m[len] = L'\0'; |
m[len] = L'\0'; |
for (j = 0; j < len; j++) |
for (j = 0; j < len; j++) |
m[j] = towupper(m[j]); |
m[j] = towupper(m[j]); |