diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-11-16 14:50:36 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-11-16 14:50:36 (GMT) |
commit | 8608a9e74ca3e375ef07dce419d6f2cf859bfebf (patch) | |
tree | dd8d25830176e888df2e7acf2da1936f4acfcc15 | |
parent | 7acba2f316a6e8f02364d76ab96b7ff9e739aec1 (diff) | |
parent | 18a5a679f57ac922183bc1800692d40c2872231f (diff) | |
download | Doxygen-8608a9e74ca3e375ef07dce419d6f2cf859bfebf.zip Doxygen-8608a9e74ca3e375ef07dce419d6f2cf859bfebf.tar.gz Doxygen-8608a9e74ca3e375ef07dce419d6f2cf859bfebf.tar.bz2 |
Merge branch 'master' of github.com:doxygen/doxygen
-rw-r--r-- | src/doxygen.cpp | 1 | ||||
-rw-r--r-- | src/markdown.cpp | 2 | ||||
-rw-r--r-- | src/portable.cpp | 17 | ||||
-rw-r--r-- | src/portable.h | 2 |
4 files changed, 21 insertions, 1 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index c622f78..b4a4deb 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -11862,6 +11862,7 @@ void generateOutput() g_s.begin("Running html help compiler...\n"); QString oldDir = QDir::currentDirPath(); QDir::setCurrent(Config_getString(HTML_OUTPUT)); + portable_setShortDir(); portable_sysTimerStart(); if (portable_system(Config_getString(HHC_LOCATION), "index.hhp", Debug::isFlagSet(Debug::ExtCmd))!=1) { diff --git a/src/markdown.cpp b/src/markdown.cpp index f6720ea..e054941 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2176,7 +2176,7 @@ static void writeFencedCodeBlock(GrowBuf &out,const char *data,const char *lng, } out.addStr(data+blockStart,blockEnd-blockStart); out.addStr("\n"); - out.addStr("@endcode"); + out.addStr("@endcode\n"); } static QCString processQuotations(const QCString &s,int refIndent) diff --git a/src/portable.cpp b/src/portable.cpp index c6e829d..b447adc 100644 --- a/src/portable.cpp +++ b/src/portable.cpp @@ -478,3 +478,20 @@ void portable_unlink(const char *fileName) #endif } +void portable_setShortDir(void) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + long length = 0; + TCHAR* buffer = NULL; + // First obtain the size needed by passing NULL and 0. + length = GetShortPathName(QDir::currentDirPath().data(), NULL, 0); + // Dynamically allocate the correct size + // (terminating null char was included in length) + buffer = new TCHAR[length]; + // Now simply call again using same (long) path. + length = GetShortPathName(QDir::currentDirPath().data(), buffer, length); + // Set the correct directory (short name) + QDir::setCurrent(buffer); + delete [] buffer; +#endif +} diff --git a/src/portable.h b/src/portable.h index 83f90ef..c1b8c29 100644 --- a/src/portable.h +++ b/src/portable.h @@ -4,6 +4,7 @@ #include <sys/types.h> #include <stdio.h> #include <qglobal.h> +#include <qdir.h> #if defined(_WIN32) typedef __int64 portable_off_t; @@ -37,6 +38,7 @@ double portable_getSysElapsedTime(); void portable_sleep(int ms); bool portable_isAbsolutePath(const char *fileName); void portable_correct_path(void); +void portable_setShortDir(void); extern "C" { void * portable_iconv_open(const char* tocode, const char* fromcode); |