libXDGdirs v1.1.2-8-gc53e5c3
An implementation of XDG Base Directory Specification
Loading...
Searching...
No Matches
print.c
Go to the documentation of this file.
1
14#include <stdio.h>
15#include <xdgdirs.h>
16
17int main()
18{
19 const char* fmt = "%-20s %s\n";
20 printf(fmt, "XDG_DATA_HOME", xdgDataHome());
21 printf(fmt, "XDG_CONFIG_HOME", xdgConfigHome());
22 printf(fmt, "XDG_CACHE_HOME", xdgCacheHome());
23 printf(fmt, "XDG_RUNTIME_DIR", xdgRuntimeDir());
24 printf(fmt, "XDG_DATA_DIRS", xdgDataDirs()->raw);
25 printf(fmt, "XDG_CONFIG_DIRS", xdgConfigDirs()->raw);
27 return 0;
28}
void xdgDirs_clear(void)
Clear cached data.
xdgDirsList * xdgConfigDirs(void)
Value of $XDG_CONFIG_DIRS.
xdgDirsList * xdgDataDirs(void)
Value of $XDG_DATA_DIRS.
const char * xdgRuntimeDir(void)
Value of $XDG_RUNTIME_DIR.
const char * xdgCacheHome(void)
Value of $XDG_CACHE_HOME.
const char * xdgConfigHome(void)
Value of $XDG_CONFIG_HOME.
const char * xdgDataHome(void)
Value of $XDG_DATA_HOME.
int main()
Definition test.c:4