unix_home.h (270B)
1 #pragma once 2 3 #include <stdlib.h> 4 5 #include "dynstr.h" 6 7 inline void get_config_directory( DynamicString & path ) { 8 const char * home = getenv( "HOME" ); 9 if( home == NULL ) { 10 FATAL( "can't read HOME environment variable" ); 11 } 12 path.sprintf( "{}/.medfall", home ); 13 }