Skip to content

Commit 32918ca

Browse files
committed
s
1 parent 73a5bb4 commit 32918ca

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/path.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ bool Path::isHeader(const std::string &path)
251251

252252
static bool hasEmacsCppMarker(const char* path)
253253
{
254+
// TODO: identify is called three times for each file
255+
std::cout << path << '\n';
256+
254257
FILE *fp = fopen(path, "rt");
255258
if (!fp)
256259
return false;
@@ -274,7 +277,7 @@ static bool hasEmacsCppMarker(const char* path)
274277
if (buf_trim[0] != '/' || buf_trim[1] != '/')
275278
return false; // not a comment
276279

277-
std::cout /*<< path << " -*/ << "Emacs marker: '" << buf.substr(pos1, (pos2 + 3) - pos1) << "'" << std::endl;
280+
std::cout /*<< path << " -*/ << "Emacs marker: '" << buf.substr(pos1, (pos2 + 3) - pos1) << "'" << '\n';
278281

279282
// there are more variations with lowercase and no whitespaces
280283
// -*- C++ -*-
@@ -293,7 +296,7 @@ static bool hasEmacsCppMarker(const char* path)
293296

294297
//if (marker == "C" || marker == "c")
295298
// return false;
296-
std::cout << path << " - unmatched Emacs marker: '" << marker << "'" << std::endl;
299+
std::cout << path << " - unmatched Emacs marker: '" << marker << "'" << '\n';
297300

298301
return false; // marker is not a C++ one
299302
}

0 commit comments

Comments
 (0)