X-Git-Url: https://git.jsancho.org/?p=dungeon-master.git;a=blobdiff_plain;f=src%2Fpaths.cpp;fp=src%2Fpaths.cpp;h=b7a8374f0ae6e49fdc138bfcd02d741ffe4e1fcb;hp=02aee3f28264a1be1ceac9849dd5238ba6a676f2;hb=4fce641cc077d18f972e250d2fe3be5067618127;hpb=feed3accdc0482b11535c72119ea73f627f633ed diff --git a/src/paths.cpp b/src/paths.cpp index 02aee3f..b7a8374 100644 --- a/src/paths.cpp +++ b/src/paths.cpp @@ -18,7 +18,8 @@ #include #include "paths.h" -std::string get_exec_path () +std::string +get_exec_path () { char pBuf[256]; size_t len = sizeof (pBuf); @@ -35,12 +36,14 @@ std::string get_exec_path () return exec_path.substr (0, exec_path.rfind (PATH_DELIM) + 1); } -std::string get_home_path () +std::string +get_home_path () { return (std::string) getenv ("HOME") + PATH_DELIM + "." + PROGRAM_NAME; } -std::set get_dmaster_paths () { +std::set +get_dmaster_paths () { std::set paths; paths.insert (get_exec_path ()); paths.insert (DATA_PATH);