4 main(int argc
, char* argv
[])
6 const char * const * item
;
7 xdgHandle handle
= xdgAllocHandle();
9 printf("${XDG_DATA_HOME:-$HOME/.local/share}=%s\n", xdgDataHome(handle
));
10 printf("${XDG_CONFIG_HOME:-$HOME/.config}=%s\n", xdgConfigHome(handle
));
11 printf("${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}=");
12 for (item
= xdgDataDirectories(handle
); *item
; item
++)
13 printf("%s%c", *item
, (item
[1] ? ':' : '\n'));
14 printf("${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}=");
15 for (item
= xdgSearchableDataDirectories(handle
); *item
; item
++)
16 printf("%s%c", *item
, (item
[1] ? ':' : '\n'));
17 printf("${XDG_CONFIG_DIRS:-/etc/xdg}=");
18 for (item
= xdgConfigDirectories(handle
); *item
; item
++)
19 printf("%s%c", *item
, (item
[1] ? ':' : '\n'));
20 printf("${XDG_CONFIG_HOME:-$HOME/.config}:${XDG_CONFIG_DIRS:-/etc/xdg}=");
21 for (item
= xdgSearchableConfigDirectories(handle
); *item
; item
++)
22 printf("%s%c", *item
, (item
[1] ? ':' : '\n'));
23 printf("${XDG_CACHE_HOME:-$HOME/.cache}=%s\n", xdgCacheHome(handle
));
24 xdgFreeHandle(handle
);