summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.72.0/src/compat_posix.cpp
blob: d5d5012fcca77b22e1977e9dab97f74d40ea562c (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
40
/**
 * @file compat_posix.cpp
 * Compatibility functions for POSIX
 *
 * @author  Ben Gardner
 * @license GPL v2+
 */
#ifndef WIN32

#include "uncrustify_types.h"
#include <cstdlib>
#include <string>


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

   if (val)
   {
      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 */