2 // This file is part of hhpcomp, a free HTML Help Project (*.hhp) compiler.
3 // Copyright (C) 2015 Benedikt Freisen
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 #define WIN32_LEAN_AND_MEAN
26 #include <windows.h> // for GetFullPathNameA
35 string
to_upper(string s
)
38 transform(temp
.begin(), temp
.end(), temp
.begin(), ::toupper
);
42 string
real_path(const char* path
)
47 if (GetFullPathNameA(path
, MAX_PATH
, temp2
, NULL
)) {
51 temp
= realpath(path
, NULL
);
54 throw runtime_error("realpath failed");
62 string
replace_backslashes(string s
)
65 for (string::iterator it
= temp
.begin(); it
!= temp
.end(); ++it
)