This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: genini: message field always emitted


On Thu, Mar 11, 2010 at 09:26:38PM -0500, Charles Wilson wrote:
>Christopher Faylor wrote:
>> genini shouldn't assume that message is required and setup.exe shouldn't
>> have to care about blank messages.
>> 
>> Btw, the syntax is (or should be):
>> 
>> message keyword "something"
>> 
>> That's why you're seeing a syntax error.
>
>@@ -87,8 +93,10 @@ sub get {
>     my $val = shift;
> 
>     if ($keyhint eq 'message') {
>-	my ($kw, $rest) = /^(\S+)\s+(.*)$/;
>-	return $kw . ' ' . get($FH, 'ldesc', $rest);
>+	if ($val) {
>+	    my ($kw, $rest) = $val =~ /^(\S+)\s+(.*)$/;
>+	    return $kw . ' ' . get($FH, 'ldesc', $rest);
>+	}

This should be checking that $val exists and issuing a syntax error
if not.  Otherwise, it looks ok.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]