Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5f37bc2

Browse files
hash fix for linux
1 parent 6fb30fb commit 5f37bc2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎pdf/hash/md5hsh.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
using namespace std;
44

55
string getHash(string s, int dig=3){
6-
ofstream ip("temp.cpp");
7-
ip.sync_with_stdio(false); // LATEX_IGNORED_LINE
8-
ip << s; ip.close();
9-
system("g++ -E -P -dD -fpreprocessed .\\temp.cpp | tr -d '[:space:]' | md5sum > hsh.temp");
6+
ofstream ip("temp.cpp");
7+
ip.sync_with_stdio(false); // LATEX_IGNORED_LINE
8+
ip << s; ip.close();
9+
system("g++ -E -P -dD -fpreprocessed ./temp.cpp | tr -d '[:space:]' | md5sum > hsh.temp");
1010
ifstream f("hsh.temp"); f >> s; f.close();
1111
for(auto&c:s)if('a'<=c)c^=32; //optional
1212
return s.substr(0, dig);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /