XpSetLocaleHinter − Sets a "locale hinter" function and description of it.
cc [ flag... ] file... -lXp [ library... ]
XpSetLocaleHinter ( hinter_proc hinter_desc )
A pointer to a "hinter proc".
A pointer to contextual information about the locale hinter proc.
Since (to date) there is no single industry standard for locale values, locale information about the current client required by XpCreateContext, XpGetPrinterList and XpGetPdmStartParams is at best considered a "hint" when transmitted to the X Print Server and PDM. In single vendor environments, the locale hint should be consistent and understood. In multi-vendor environments however, the locale hint may or may not be understood. The caller locale will be used as the fallback default.
XpSetLocaleHinter and XpGetLocaleHinter access hooks that are used to register more advanced hint generators. By default, Xp uses a hinter proc that calls setlocale on the CTYPE category on POSIX systems, and hinter_desc is NULL.
XpSetLocaleHinter sets the hinter_proc and hinter_desc which will be subsequently used by the Xp calls requiring a locale hint (see above). hinter_proc is the function that will generate the locale hint (for example, "C"), and hinter_desc is a string, with or without the embeddable keyword %locale%, that provides a higher level context for the results of hinter_proc.
If hinter_proc is set to NULL, then the default Xp hinter proc is installed. XpSetLocaleHinter makes its own private copy of hinter_desc prior to returning.
An example set call might look as follows:
XpSetLocaleHinter( my_hinter, "%locale%;CDElocale" );
Where my_hinter might look as follows:
* Use setlocale() to retrieve the current locale.
return( my_x_strdup( setlocale(LC_CTYPE, (char *) NULL) ) );
When the client’s locale is needed, if both hinter_desc and the results of hinter_proc are non-NULL, and the keyword %locale% is found in hinter_desc, then the keyword will be replaced with the result of hinter_proc. The resulting string will be used as the locale hint by the Xp calls.
If both hinter_desc and the results of hinter_proc are non-NULL, but the keyword %locale% is not found in hinter_desc, then hinter_desc, as is, becomes the string used as the locale hint by the Xp calls.
If one of hinter_desc or the results of hinter_proc is NULL, then the other non-NULL value becomes the string used as the locale hint by the Xp calls.
If hinter_desc and the results of hinter_proc are NULL, then a NULL (i.e. (char *) NULL) locale hint is sent by the Xp calls.
The syntax for hinter_desc is a variation of the unadopted X/Open standard for a "String Network Locale-Specification Syntax" (X/Open, Distributed Internationalization Services, Version 2, 1994 Snapshot). The Xp hinter_desc syntax is:
In Xp, the first item is the locale name, followed by progressively more detailed information about the locale name, with each piece of information separated by a ‘;’.
The signature for hinter_proc is defined in <X11/extensions/Print.h> as follows:
typedef char * (*XPHinterProc)();
hinter_proc is expected to return a string that can be freed using XFree by the Xp calls themselves.
Some examples include ( hinter_desc to left, expanded results to the right):
XpCreateContext(3Xp), XpGetLocaleHinter(3Xp), XpGetPdmStartParams(3Xp), XpGetPrinterList(3Xp), XpSetLocaleHinter(3Xp)
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.