Skip to content
Snippets Groups Projects
Commit c590e4ea authored by Thomas Jahns's avatar Thomas Jahns :cartwheel: Committed by Sergey Kosukhin
Browse files

Improve handling of empty comments in F77 interface generator.

* The previous implementation would enter an infinite loop if a
  comment containing only whitespace occurred (e.g. /*   */).
parent e5fb732f
No related branches found
No related tags found
2 merge requests!34Version 2.2.0,!13Consolidation with CDI-PIO (develop)
......@@ -477,7 +477,7 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint, const
}
/* compile complete comment regular expression */
{
static const char commentREString[] = "^"WS"*/\\*"WS"*(.*"NWS")"WS"*\\*/";
static const char commentREString[] = "^"WS"*/\\*"WS"*("NWS"+("WS"+"NWS"+)*)?"WS"*\\*/";
static const char comment2REString[] = "^"WS"*//"WS"*(.*"NWS")";
if (reCompile(&commentRE, commentREString, &line, &lineBufSize))
exit(EXIT_FAILURE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment