ElvishArtisan/rivendell — pull request #8 by albanpeignier (2014-09-05 08:53:37+00:00)
Title: Replace getenv by rdconf functions

There are several places in code where `HOME`, `TEMP` or `TMPDIR` environment variables are used directly :

$ git grep getenv | egrep "HOME|TMP|TEMP"
lib/rdaudioconvert.cpp: if(getenv("TEMP")!=NULL) {
lib/rdaudioconvert.cpp: strncpy(tmpdir,getenv("TEMP"),PATH_MAX-20);
lib/rdcart_dialog.cpp: if(getenv("HOME")==NULL) {
[...]

It makes configuration more difficult especially to change the temporary directory used by Rivendell (TEMP and TMPDIR are used both in code).

This pull request :

* replaces all `getenv("HOME")` by existing RDConf `RDGetHomeDir()`
* replaces all `getenv("TEMP")` or `getenv("TMPDIR")` by `RDTempDir()` (not RDTempFile ...)
* replaces few hardcoded "/tmp" by `GetTempDir()`