2 * Wrapper function around GetSystemDirectory that deals with
3 * allocating the output buffer, and also caches the result for future
9 const char *get_system_dir(void)
11 static char *sysdir
= NULL
;
12 static size_t sysdirsize
= 0;
16 while ((len
= GetSystemDirectory(sysdir
, sysdirsize
)) >= sysdirsize
)
17 sgrowarray(sysdir
, sysdirsize
, len
);