Skip to content

System Utility Functions

To use the functions defined in this section, you should include the header file <X11/Xmu/SysUtil.h> and link against the libXmu or libXmuu library.

int XmuGetHostname(char *buf, int maxlen);
int XmuGetHostname(char *buf, int maxlen);

buf

returns the host name

maxlen

specifies the length of buf

This function stores the null terminated name of the local host in buf, and returns length of the name. This function hides operating system differences, such as whether to call gethostname or uname.

int XmuSnprintf(char *str, int size, ...);
int XmuSnprintf(char *str, int size, ...);

str

string to write output to

size

specifies the size of str

This function was provided as a portable implementation of snprintf before all platforms could be relied on to provide their own. It is now deprecated in favor of calling snprintf directly and should only be used in software that needs to continue to support non-Unix98 compliant platforms.