Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/f7d99de6d008014722a8b2ab07b521802dea0748 >--------------------------------------------------------------- commit f7d99de6d008014722a8b2ab07b521802dea0748 Author: Ian Lynagh <[email protected]> Date: Sun Nov 20 18:23:37 2011 +0000 Simplify a regexp and improve a couple of comments >--------------------------------------------------------------- rts/Linker.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/rts/Linker.c b/rts/Linker.c index 4319041..1ba0260 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -1194,7 +1194,7 @@ initLinker( void ) barf("Compiling re_invalid failed"); } compileResult = regcomp(&re_realso, - "(GROUP|INPUT) *\\( *(([^ )])+)", + "(GROUP|INPUT) *\\( *([^ )]+)", REG_EXTENDED); if (compileResult != 0) { barf("Compiling re_realso failed"); @@ -1361,7 +1361,7 @@ addDLL( char *dll_name ) if ((fp = fopen(line, "r")) == NULL) { return errmsg; // return original error if open fails } - // try to find a GROUP ( ... ) command + // try to find a GROUP or INPUT ( ... ) command while (fgets(line, MAXLINE, fp) != NULL) { IF_DEBUG(linker, debugBelch("input line = %s", line)); if (regexec(&re_realso, line, (size_t) NMATCH, match, 0) == 0) { @@ -1371,8 +1371,9 @@ addDLL( char *dll_name ) errmsg = internal_dlopen(line+match[2].rm_so); break; } - // if control reaches here, no GROUP ( ... ) directive was found - // and the original error message is returned to the caller + // if control reaches here, no GROUP or INPUT ( ... ) directive + // was found and the original error message is returned to the + // caller } fclose(fp); } _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
