ReactOS  0.4.15-dev-5618-g8866b9d
utils.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


string to_upper (string s)
string real_path (const char *path)
string replace_backslashes (string s)

Function Documentation

◆ real_path()

string real_path ( const char path)

Definition at line 43 of file utils.cpp.

44 {
45  char* temp = NULL;
46  #if defined(_WIN32)
47  char temp2[MAX_PATH];
48  if (GetFullPathNameA(path, MAX_PATH, temp2, NULL)) {
49  temp = temp2;
50  }
51  #else
52  temp = realpath(path, NULL);
53  #endif
54  if (temp == NULL)
55  throw runtime_error("realpath failed");
56  string result(temp);
57  #if !defined(_WIN32)
58  free(temp);
59  #endif
60  return result;
61 }
GLuint64EXT * result
Definition: glext.h:11304
#define free
Definition: debug_ros.c:5
DWORD WINAPI GetFullPathNameA(IN LPCSTR lpFileName, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart)
Definition: path.c:993
#define MAX_PATH
Definition: compat.h:34
static calc_node_t temp
Definition: rpn_ieee.c:38
#define NULL
Definition: types.h:112

Referenced by hhp_reader::compute_unique_file_pathes_set(), and main().

◆ replace_backslashes()

string replace_backslashes ( string  s)

◆ to_upper()

string to_upper ( string  s)