mirror of
https://git.freebsd.org/ports.git
synced 2025-07-10 05:49:22 -04:00
Disable default runtime hard-depend on LATeX. It needed only for some science/math apps to render formulas. Sponsored by: Netzkommune GmbH
52 lines
1.6 KiB
Text
52 lines
1.6 KiB
Text
--- src/util.cpp.orig 2021-08-18 18:55:03 UTC
|
|
+++ src/util.cpp
|
|
@@ -30,6 +30,7 @@
|
|
#include <cinttypes>
|
|
#include <sstream>
|
|
|
|
+#include <sys/types.h>
|
|
#include "md5.h"
|
|
|
|
#include "regex.h"
|
|
@@ -3638,24 +3639,18 @@ QCString convertNameToFile(const QCString &name,bool a
|
|
if (resultLen>=128) // prevent names that cannot be created!
|
|
{
|
|
// third algorithm based on MD5 hash
|
|
- uchar md5_sig[16];
|
|
- char sigStr[33];
|
|
- MD5Buffer((const unsigned char *)result.data(),resultLen,md5_sig);
|
|
- MD5SigToString(md5_sig,sigStr);
|
|
+ QCString sigStr(33);
|
|
+ MD5Data((const unsigned char *)result.data(),resultLen,sigStr.rawData());
|
|
result=result.left(128-32)+sigStr;
|
|
}
|
|
}
|
|
if (createSubdirs)
|
|
{
|
|
- int l1Dir=0,l2Dir=0;
|
|
-
|
|
// compute md5 hash to determine sub directory to use
|
|
- uchar md5_sig[16];
|
|
- MD5Buffer((const unsigned char *)result.data(),result.length(),md5_sig);
|
|
- l1Dir = md5_sig[14]&0xf;
|
|
- l2Dir = md5_sig[15];
|
|
+ char md5[33];
|
|
+ MD5Data((const unsigned char *)result.data(),result.length(),md5);
|
|
|
|
- result.prepend(QCString().sprintf("d%x/d%02x/",l1Dir,l2Dir));
|
|
+ result.prepend(QCString().sprintf("d%c/d%c%c/",md5[29],md5[30],md5[31]));
|
|
}
|
|
//printf("*** convertNameToFile(%s)->%s\n",qPrint(name),qPrint(result));
|
|
return result;
|
|
@@ -7251,6 +7246,11 @@ QCString selectBlock(const QCString& s,const QCString
|
|
QCString removeEmptyLines(const QCString &s)
|
|
{
|
|
BufStr out(s.length()+1);
|
|
+ if (s.length()==0)
|
|
+ {
|
|
+ out.addChar('\0');
|
|
+ return out.data();
|
|
+ }
|
|
const char *p=s.data();
|
|
if (p)
|
|
{
|