From 43b9b2c7dad7ccb689e85c084b3b3f324375b69a Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 12 Oct 2005 22:49:23 +0000 Subject: [PATCH] Allow mca-params.conf files to not have a \n at the end of the file This commit was SVN r7741. --- opal/mca/base/mca_base_parse_paramfile.c | 3 ++- opal/mca/base/mca_base_parse_paramfile_lex.l | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/opal/mca/base/mca_base_parse_paramfile.c b/opal/mca/base/mca_base_parse_paramfile.c index 36ebdc84d2..d1cc553983 100644 --- a/opal/mca/base/mca_base_parse_paramfile.c +++ b/opal/mca/base/mca_base_parse_paramfile.c @@ -107,7 +107,8 @@ static int parse_line(void) /* Now we need to see the newline */ val = mca_base_yylex(); - if (MCA_BASE_PARSE_NEWLINE == val) { + if (MCA_BASE_PARSE_NEWLINE == val || + MCA_BASE_PARSE_DONE == val) { return OMPI_SUCCESS; } } diff --git a/opal/mca/base/mca_base_parse_paramfile_lex.l b/opal/mca/base/mca_base_parse_paramfile_lex.l index 80f2cc6938..cfe2587e60 100644 --- a/opal/mca/base/mca_base_parse_paramfile_lex.l +++ b/opal/mca/base/mca_base_parse_paramfile_lex.l @@ -68,7 +68,7 @@ CHAR [A-Za-z0-9_\-\.] {CHAR}+ { return MCA_BASE_PARSE_SINGLE_WORD; } {WHITE}*\n { BEGIN(INITIAL); return MCA_BASE_PARSE_NEWLINE; } -[^\n]*[^\t \n]/[\t ]*\n { return MCA_BASE_PARSE_VALUE; } +[^\n]*[^\t \n]/[\t ]* { return MCA_BASE_PARSE_VALUE; } . { return MCA_BASE_PARSE_ERROR; }