DOKK / manpages / debian 12 / libxgks-dev / getudprefix.3.en
GETUDPREFIX(3) UNIDATA LIBRARY FUNCTIONS GETUDPREFIX(3)

getudprefix - return installation prefix of Unidata software


const char *getudprefix(void);

This function returns the pathname of the directory off of which most Unidata-supported software is installed. Thus, it may be used during program execution to help form needed pathnames. For example:

#include <string.h>
extern const char		*getudprefix(void);
char		pathbuf[256];
...
	(void)strcat(strcpy(pathbuf, getudprefix()), 
		"/etc/udunits.dat");

The function returns the value of the environment variable UDPREFIX, if it exists; otherwise, the value of the environment variable UDHOME is returned, if it exists; otherwise, the home directory of the user database entry returned by `getuduser()' is used, if it exists; otherwise, the empty string ("") is returned.

Contains the pathname of the root of the installed, Unidata software.
Contains the pathname of the home directory of the Unidata user.

getuduser(3).

$Date: 2000/08/07 23:15:03 $ Printed: 0.0.0