191 static int num_locales =
sizeof(locales) /
sizeof(locales[0]);
193 static int compare(
const void *pkey,
const void *pval)
195 LCID code = *(
const LCID *)pkey;
196 const struct locale *loc = pval;
197 return code - loc->code;
202 LCID code = GetUserDefaultLCID();
203 struct locale *loc = bsearch(&code,
204 locales, num_locales,
sizeof(locales[0]),
208 fprintf(stdout,
"%s\n", loc->name);
int compare(const void *a, const void *b)