summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/src/compat_posix.cpp
blob: c77c7a89d18ec22a87330bb73d1e8f7f802cf80d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
 * @file compat_posix.cpp
 * Compatibility functions for POSIX
 *
 * @author  Ben Gardner
 * @license GPL v2+
 */

#ifndef WIN32

#include "uncrustify_types.h"


bool unc_getenv(const char *name, std::string &str)
{
   const char *val = getenv(name);

   if (val != nullptr)
   {
      str = val;
      return(true);
   }
   return(false);
}


bool unc_homedir(std::string &home)
{
   return(unc_getenv("HOME", home));
}


void convert_log_zu2lu(char *fmt)
{
   UNUSED(fmt);
   // nothing to do
}

#endif /* ifndef WIN32 */