Chapter 13. Examples of I18N
117
return 0; /* failure */
}
if (text_prop_return >encoding == XA_STRING) return 1;
text_prop_return >nitems = strlen((char *)text_prop_return >value);
status = XmbTextPropertyToTextList(d, text_prop_return,
&list, &num);
if (status >= Success && num > 0 && *list) {
XFree(text_prop_return >value);
text_prop_return >value
= (unsigned char*)strdup(*list);
text_prop_return >nitems = strlen(*list);
XFreeStringList(list);
return 1; /* success */
}
return 0;
}
Status QuasiXGetWMIconName(Display *d, Window w,
XTextProperty *text_prop_return)
{
int status;
char **list;
int num;
status = XGetWMIconName(d, w, text_prop_return);
if (!status || !text_prop_return >value || text_prop_return >nitems <= 0) {
return 0;
}
if (text_prop_return >encoding == XA_STRING) return 1;
text_prop_return >nitems = strlen((char *)text_prop_return >value);
status = XmbTextPropertyToTextList(d, text_prop_return,
&list, &num);
if (status >= Success && num > 0 && *list) {
XFree(text_prop_return >value);
text_prop_return >value
= (unsigned char*)strdup(*list);
text_prop_return >nitems = strlen(*list);
XFreeStringList(list);
return 1;
}
return 0;
}
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved